time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Kevin has just recevied his disappointing results on the USA Identification of Cows Olympiad (USAICO) in the form of a binary string of length n…
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Pasha decided to invite his friends to a tea party. For that occasion, he has a large teapot with the capacity of w milliliters and 2n tea cups,…
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Vanya got an important task - he should enumerate books in the library and label each book with its number. Each of the n books should be assigne…
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output The mobile application store has a new game called "Subway Roller". The protagonist of the game Philip is located in one end of the tunnel a…
time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output There are n beacons located at distinct positions on a number line. The i-th beacon has position ai and power level bi. When the i-th beacon is…
time limit per test4 seconds memory limit per test512 megabytes inputstandard input outputstandard output Vanya got bored and he painted n distinct points on the plane. After that he connected all the points pairwise and saw that as a result many tri…
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output The process of mammoth's genome decoding in Berland comes to its end! One of the few remaining tasks is to restore unrecognized nucleotides in a…