随笔分类 - 0J---Codeforces
摘要:Walking through the streets of Marshmallow City, Slastyona have spotted some merchants selling a kind of useless toy which is very popular nowadays –
阅读全文
摘要:小K手中有n张牌,每张牌上有一个一位数的数,这个字数不是0就是5。小K从这些牌在抽出任意张(不能抽0张),排成一行这样就组成了一个数。使得这个数尽可能大,而且可以被90整除。 注意: 1.这个数没有前导0, 2.小K不需要使用所有的牌。 小K手中有n张牌,每张牌上有一个一位数的数,这个字数不是0就是
阅读全文
摘要:Pashmak has fallen in love with an attractive girl called Parmida since one year ago... Today, Pashmak set up a meeting with his partner in a romantic
阅读全文
摘要:Recently Anton found a box with digits in his room. There are k2 digits 2, k3 digits 3, k5 digits 5 and k6 digits 6. Anton's favorite integers are 32
阅读全文
摘要:Someday, Drazil wanted to go on date with Varda. Drazil and Varda live on Cartesian plane. Drazil's home is located in point (0, 0) and Varda's home i
阅读全文
摘要:A and B are preparing themselves for programming contests. To train their logical thinking and solve problems better, A and B decided to play chess. D
阅读全文
摘要:Our good friend Mole is trying to code a big message. He is typing on an unusual keyboard with characters arranged in following way: qwertyuiopasdfghj
阅读全文
摘要:What joy! Petya's parents went on a business trip for the whole year and the playful kid is left all by himself. Petya got absolutely happy. He jumped
阅读全文
摘要:So, the New Year holidays are over. Santa Claus and his colleagues can take a rest and have guests at last. When two "New Year and Christmas Men" meet
阅读全文
摘要:Simon and Antisimon play a game. Initially each player receives one fixed positive integer that doesn't change throughout the game. Simon receives num
阅读全文
摘要:Bob is preparing to pass IQ test. The most frequent task in this test is to find out which one of the given n numbers differs from the others. Bob obs
阅读全文
摘要:Little Chris is bored during his physics lessons (too easy), so he has built a toy box to keep himself occupied. The box is special, since it has the
阅读全文
摘要:Polycarp has just invented a new binary protocol for data transmission. He is encoding positive integer decimal number to binary string using followin
阅读全文
摘要:Kirito is stuck on a level of the MMORPG he is playing now. To move on in the game, he's got to defeat all n dragons that live on this level. Kirito a
阅读全文
摘要:Duff is addicted to meat! Malek wants to keep her happy for n days. In order to be happy in i-th day, she needs to eat exactly ai kilograms of meat. T
阅读全文
摘要:Olesya loves numbers consisting of n digits, and Rodion only likes numbers that are divisible by t. Find some number that satisfies both of them. Your
阅读全文
摘要:All cities of Lineland are located on the Ox coordinate axis. Thus, each city is associated with its position xi — a coordinate on the Ox axis. No two
阅读全文
摘要:A and B are preparing themselves for programming contests. B loves to debug his code. But before he runs the solution and starts debugging, he has to
阅读全文
摘要:There are n pictures delivered for the new exhibition. The i-th painting has beauty ai. We know that a visitor becomes happy every time he passes from
阅读全文