随笔分类 - CF
摘要:Vasya has n days of vacations! So he decided to improve his IT skills and do sport. Vasya knows the following information about each of this n days: w
阅读全文
摘要:You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and su
阅读全文
摘要:NEKO#ΦωΦ has just got a new maze game on her PC! The game's main puzzle is a maze, in the forms of a 2×n2×n rectangle grid. NEKO's task is to lead a N
阅读全文
摘要:Bajtek is learning to skate on ice. He's a beginner, so his only mode of transportation is pushing off from a snow drift to the north, east, south or
阅读全文
摘要:Alice's hair is growing by leaps and bounds. Maybe the cause of it is the excess of vitamins, or maybe it is some black magic... To prevent this, Alic
阅读全文
摘要:PolandBall lives in a forest with his family. There are some trees in the forest. Trees are undirected acyclic graphs with k vertices and k - 1 edges,
阅读全文
摘要:Mahmoud wants to send a message to his friend Ehab. Their language consists of n words numbered from 1 to n. Some words have the same meaning so there
阅读全文
摘要:Scientists say a lot about the problems of global warming and cooling of the Earth. Indeed, such natural phenomena strongly influence all life on our
阅读全文
摘要:A well-known art union called "Kalevich is Alive!" manufactures objects d'art (pictures). The union consists of n painters who decided to organize the
阅读全文
摘要:Long story short, shashlik is Miroslav's favorite food. Shashlik is prepared on several skewers simultaneously. There are two states for each skewer:
阅读全文
摘要:Max wants to buy a new skateboard. He has calculated the amount of money that is needed to buy a new skateboard. He left a calculator on the floor and
阅读全文
摘要:Mike has n strings s1, s2, ..., sn each consisting of lowercase English letters. In one move he can choose a string si, erase the first character and
阅读全文
摘要:You are given a non-empty string s=s1s2…sns=s1s2…sn, which consists only of lowercase Latin letters. Polycarp does not like a string if it contains at
阅读全文
摘要:After the fourth season Sherlock and Moriary have realized the whole foolishness of the battle between them and decided to continue their competitions
阅读全文
摘要:Recall that string aa is a subsequence of a string bb if aa can be obtained from bb by deletion of several (possibly zero or all) characters. For exam
阅读全文
摘要:You are given an array aa consisting of nn integers. Each aiai is one of the six following numbers: 4,8,15,16,23,424,8,15,16,23,42. Your task is to re
阅读全文
摘要:You are given two binary strings aa and bb of the same length. You can perform the following two operations on the string aa: Swap any two bits at ind
阅读全文
摘要:You're given an integer nn. For every integer ii from 22 to nn, assign a positive integer aiai such that the following conditions hold: For any pair o
阅读全文
摘要:Dreamoon is standing at the position 0 on a number line. Drazil is sending a list of commands through Wi-Fi to Dreamoon's smartphone and Dreamoon foll
阅读全文
摘要:Polycarpus has a ribbon, its length is n. He wants to cut the ribbon in a way that fulfils the following two conditions: After the cutting each ribbon
阅读全文

浙公网安备 33010602011771号