【39.77%】【codeforces 724B】Batch Sort】的更多相关文章

time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output You are given a table consisting of n rows and m columns. Numbers in each row form a permutation of integers from 1 to m. You are allowed to pic…
题目链接 可以发现 十进制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 Anton likes to play chess, and so does his friend Danik. Once they have played n games in a row. For each game it's known who was the winner - An…
time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Roman planted a tree consisting of n vertices. Each vertex contains a lowercase English letter. Vertex 1 is the root of the tree, each of the n …
time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Alyona's mother wants to present an array of n non-negative integers to Alyona. The array should be special. Alyona is a capricious girl so afte…
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Amr loves Chemistry, and specially doing experiments. He is preparing for a new interesting experiment. Amr has n different types of chemicals. E…
time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output People do many crazy things to stand out in a crowd. Some of them dance, some learn by heart rules of Russian language, some try to become a…
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Vanya is doing his maths homework. He has an expression of form , where x1, x2, -, xn are digits from 1 to 9, and sign represents either a plus '…
time limit per test4 seconds memory limit per test256 megabytes inputstandard input outputstandard output Anton is playing a very interesting computer game, but now he is stuck at one of the levels. To pass to the next level he has to prepare n potio…
time limit per test2.5 seconds memory limit per test256 megabytes inputstandard input outputstandard output One tradition of welcoming the New Year is launching fireworks into the sky. Usually a launched firework flies vertically upward for some peri…