题意:一个数,二进制形式去掉leading zero后,如果0的数量大于等于1的数量,计算区间内这样数的个数。 右区间转为二进制形式,然后在二进制上数位dp,递归的时候记录leading zero是否消除了,以及0比1多的数量delta。dp记录时有没有leading zero也是一个状态。 ...
分类:
其他好文 时间:
2018-09-30 16:34:10
阅读次数:
149
Description A research laboratory of a world leading automobile company has received an order to create a special transmission mechanism, which allows ...
分类:
编程语言 时间:
2018-09-22 21:19:35
阅读次数:
292
前言:在 分析轮子(二)- << ,>>,>> (左移、右移、无符号右移)的时候发现十进制数转二进制数的时候,负数的位数是够的,比如:负整数 -15 的二进制表示是:11111111111111111111111111110001 ,但是 正整数 15 的二进制表示是:1111,抱着好奇心,我看了一 ...
分类:
其他好文 时间:
2018-09-08 22:29:20
阅读次数:
173
2. Add Two Numbers You are given two non empty linked lists representing two non negative integers. The digits are stored in reverse order and each of ...
分类:
其他好文 时间:
2018-09-07 15:56:30
阅读次数:
152
Prime Path Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 987 Accepted Submission(s): 635 Proble ...
分类:
其他好文 时间:
2018-08-31 21:04:43
阅读次数:
205
选自 https://members.iqmatrix.co/creative-mind-maps I personally use Mindjet MindManager. This is one of the leading mind mapping software applications, ...
分类:
移动开发 时间:
2018-08-23 02:23:33
阅读次数:
323
S.strip([chars])leading and trailingexample:my_str = '(d)d(d)))' -> 'd)d(d'
分类:
编程语言 时间:
2018-08-14 11:29:33
阅读次数:
175
运行yum时出现错误,缺失libsasl2.so.2文件[root@localhost /]# yum repolistThere was a problem importing one of the Python modulesrequired to run yum. The error leading to this problem was: libsasl2.so.2
分类:
其他好文 时间:
2018-08-13 12:20:11
阅读次数:
531
题目描述: Example: Note: A word is defined as a sequence of non-space characters. Input string may contain leading or trailing spaces. However, your rever ...
分类:
其他好文 时间:
2018-08-10 21:22:40
阅读次数:
135
题目链接:https://vjudge.net/problem/LightOJ-1282 求后三位我们可以用快速幂取模算出来,但是前三位怎么办呢? 对于任意一个数y,都可以表示为10^x,这实际上就是一个以10为底的指数函数,y = 10^x,所以x = log10(y),这个x就分为整数部分和小数 ...
分类:
其他好文 时间:
2018-08-09 22:02:37
阅读次数:
138