time limit per test5 seconds memory limit per test256 megabytes inputstandard input outputstandard output Berland amusement park shooting gallery is rightly acknowledged as one of the best in the world. Every day the country's best shooters master th…
题目链接 可以发现 十进制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 test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output There are n servers in a laboratory, each of them can perform tasks. Each server has a unique id - integer from 1 to n. It is known that during…
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Little girl Alyona is in a shop to buy some copybooks for school. She study four subjects so she wants to have equal number of copybooks for each…
time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output In Absurdistan, there are n towns (numbered 1 through n) and m bidirectional railways. There is also an absurdly simple road network - for each…
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Anton loves transforming one permutation into another one by swapping elements for money, and Ira doesn't like paying for stupid games. Help them…
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output A big company decided to launch a new series of rectangular displays, and decided that the display must have exactly n pixels. Your task is to de…
time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Vika has an infinite sheet of squared paper. Initially all squares are white. She introduced a two-dimensional coordinate system on this sheet a…
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Limak is going to participate in a contest on the last day of the 2016. The contest will start at 20:00 and will last four hours, exactly until m…
[题目链接]:http://codeforces.com/problemset/problem/709/D [题意] 给你一个序列; 给出01子列和10子列和00子列以及11子列的个数; 然后让你输出一个符合要求的序列; [题解] 这里 00和11可以确定出序列中0和1的个数; 但有边缘数据 00如果为0代表什么? ->没有0或者是有1个0 11如果为0代表什么? ->没有1或者是有1个1 对这两种情况需要特判一下(两种情况的特判需要用到01和10的数量) 看代码吧. 然后这两种情况排除之后;…