摘要:
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 阅读全文
摘要:
Vova promised himself that he would never play computer games... But recently Firestorm — a well-known game developing company — published their newes 阅读全文
摘要:
The only difference between easy and hard versions is constraints. There are nn kids, each of them is reading a unique book. At the end of any day, th 阅读全文
摘要:
Pavel loves grid mazes. A grid maze is an n × m rectangle maze where each cell is either empty, or is a wall. You can go from one cell to another only 阅读全文
摘要:
A company has n employees numbered from 1 to n. Each employee either has no immediate manager or exactly one immediate manager, who is another employe 阅读全文
摘要:
DZY loves chessboard, and he enjoys playing with it. He has a chessboard of n rows and m columns. Some cells of the chessboard are bad, others are goo 阅读全文
摘要:
Berland shop sells nn kinds of juices. Each juice has its price cici. Each juice includes some set of vitamins in it. There are three types of vitamin 阅读全文