time limit per test: 2 secondsmemory limit per test: 256 megabytesinput: standard inputoutput: standard output XXI Berland Annual Fair is coming really soon! Traditionally fair consists of nnn booths, arranged in a circle. The booths are numbered 111…
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Soon a school Olympiad in Informatics will be held in Berland, n schoolchildren will participate there. At a meeting of the jury of the Olympiad…
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output In Berland it is the holiday of equality. In honor of the holiday the king decided to equalize the welfare of all citizens in Berland by the expe…
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Gennady is one of the best child dentists in Berland. Today n children got an appointment with him, they lined up in front of his office. All chi…
time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Due to the increase in the number of students of Berland State University it was decided to equip a new computer room. You were given the task o…
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output The tram in Berland goes along a straight line from the point 0 to the point s and back, passing 1 meter per t1 seconds in both directions. It me…
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…
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output The winter in Berland lasts n days. For each day we know the forecast for the average air temperature that day. Vasya has a new set of winter tir…