题目链接:http://codeforces.com/problemset/problem/611/B B. New Year and Old Property time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output The year 2015 is almost over. Limak is a little polar bear.…
B. New Year and Old Property 题目连接: http://www.codeforces.com/contest/611/problem/B Description The year 2015 is almost over. Limak is a little polar bear. He has recently learnt about the binary system. He noticed that the passing year has exactly on…
B. New Year and Old Property   The year 2015 is almost over. Limak is a little polar bear. He has recently learnt about the binary system. He noticed that the passing year has exactly one zero in its representation in the binary system — 201510 = 111…
题目链接:http://codeforces.com/problemset/problem/611/B 题目意思:就是在 [a, b] 这个范围内(1 ≤ a ≤ b ≤ 10^18)统计出符合二进制数表示只有 1 个 0 的数量是多少. *********************** 首先贴出一段绝对会超时的代码,连提交的勇气都木有呢~因为第四组数据已经接近龟速了,所以...(大家可忽略) #include <iostream> #include <cstdio> #includ…
题意:统计在n,m之间的数的二进制表示形式只有一个零的数目. 位运算模拟+dfs #include<iostream> #include<string> #include<algorithm> #include<cstdlib> #include<cstdio> #include<set> #include<map> #include<vector> #include<cstring> #inclu…
D. New Year and Ancient Prophecy time limit per test 2.5 seconds memory limit per test 512 megabytes input standard input output standard output Limak is a little polar bear. In the snow he found a scroll with the ancient prophecy. Limak doesn't know…
A. New Year and Days   Today is Wednesday, the third day of the week. What's more interesting is that tomorrow is the last day of the year 2015. Limak is a little polar bear. He enjoyed this year a lot. Now, he is so eager to the coming year 2016. Li…
A. New Year and Days 题目连接: http://www.codeforces.com/contest/611/problem/A Description Today is Wednesday, the third day of the week. What's more interesting is that tomorrow is the last day of the year 2015. Limak is a little polar bear. He enjoyed…
C. New Year and Domino   They say "years are like dominoes, tumbling one after the other". But would a year fit into a grid? I don't think so. Limak is a little polar bear who loves to play. He has recently got a rectangular grid with h rows and…
D. New Year and Ancient Prophecy 题目连接: http://www.codeforces.com/contest/611/problem/C Description Limak is a little polar bear. In the snow he found a scroll with the ancient prophecy. Limak doesn't know any ancient languages and thus is unable to u…