【18.40%】【codeforces 631D】Messenger】的更多相关文章

time limit per test 2 seconds memory limit per test 512 megabytes input standard input output standard output Each employee of the "Blake Techologies" company uses a special messaging app "Blake Messenger". All the stuff likes this app…
题目链接 可以发现 十进制4 对应 二进制100 十进制16 对应 二进制10000 十进制64 对应 二进制1000000 可以发现每多两个零,4的次幂就增加1. 用string读入题目给定的二进制数字,求出其长len,当len为奇数时,第一位为1,后面的位数如果都为0,则输出len,如果有一个不为0,则输出len+1: 当len为偶数时,则输出len.(之所以这样输出是因为题目给定4的次幂是从0开始的) #include<iostream> #include<string> #…
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Chloe, the same as Vladik, is a competitive programmer. She didn't have any problems to get to the olympiad like Vladik, but she was confused by…
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Companies always have a lot of equipment, furniture and other things. All of them should be tracked. To do this, there is an inventory number ass…
time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Spongebob is already tired trying to reason his weird actions and calculations, so he simply asked you to find all pairs of n and m, such that t…
[题目链接]:http://codeforces.com/contest/761/problem/E [题意] 给你一棵树,让你在平面上选定n个坐标; 使得这棵树的连接关系以二维坐标的形式展现出来; [题解] dfs来搞; 显然如果某个点的度数大于4就无解. 初始坐标为(0,0)然后每一层的边的长度变为上一层长度的1/2 初始层的长度为2 30   这样可以保证每层节点都不会和上一层的相交; 因为2 i >2 1 +2 2 +...+2 i−1   又因为最多只有30个节点,所以这么做肯定是可以…
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Vasya is currently at a car rental service, and he wants to reach cinema. The film he has bought a ticket for starts in t minutes. There is a str…
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Pasha decided to invite his friends to a tea party. For that occasion, he has a large teapot with the capacity of w milliliters and 2n tea cups,…
time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output When Xellos was doing a practice course in university, he once had to measure the intensity of an effect that slowly approached equilibrium. A g…
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output After seeing the "ALL YOUR BASE ARE BELONG TO US" meme for the first time, numbers X and Y realised that they have different bases, which co…