time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere is a sequence of colorful stones. The color of each stone is one of red, green, or blue. You are given a string s. The i-th (1-based)
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputSometimes some words like "localization" or "internationalization" are so long that writing them many times in one text is quite tiresome.Let's
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou've got a rectangular parallelepiped with integer edge lengths. You know the areas of its three faces that have a common vertex. Your task is to
time limit per test2 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard outputTheatre Square in the capital city of Berland has a rectangular shape with the size n × m meters. On the occasion of the city's anniversary, a
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe Little Elephant enjoys recursive functions.This time he enjoys the sorting function. Let a is a permutation of an integers from 1 to n,
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle Vasya loves orange juice very much. That's why any food and drink in his kitchen necessarily contains orange juice. There are n drinks in
time limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAfter the lessons n groups of schoolchildren went outside and decided to visit Polycarpus to celebrate his birthday. We know that the i-th group
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasya's bicycle chain drive consists of two parts: n stars are attached to the pedal axle, m stars are attached to the rear wheel axle. The chain
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasya is very upset that many people on the Net mix uppercase and lowercase letters in one word. That's why he decided to invent an extension for
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputWhen Petya went to school, he got interested in large numbers and what they were called in ancient times. For instance, he learned that the Russian
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe hero of our story, Valera, and his best friend Arcady are still in school, and therefore they spend all the free time playing turn-based
time limit per test1 secondmemory limit per test64 megabytesinputstandard inputoutputstandard outputOne hot summer day Pete and his friend Billy decided to buy a watermelon. They chose the biggest and the ripest one, in their opinion. After that the
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputGreg is a beginner bodybuilder. Today the gym coach gave him the training plan. All it had was n integers a1, a2, ..., an. These numbers mean that
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputDima and his friends have been playing hide and seek at Dima's place all night. As a result, Dima's place got messy. In the morning they decided
time limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output"Contestant who earns a score equal to or greater than the k-th place finisher's score will advance to the next round, as long as the contestant
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle boy Valera studies an algorithm of sorting an integer array. After studying the theory, he went on to the practical tasks. As a result, he
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are n walruses sitting in a circle. All of them are numbered in the clockwise order: the walrus number 2 sits to the left of the walrus
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasya has found a piece of paper with a coordinate system written on it. There are n distinct squares drawn in this coordinate system. Let's number