time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputSo, the New Year holidays are over. Santa Claus and his colleagues can take a rest and have guests at last. When two "New Year and Christmas Men"
time limit per test1 secondmemory limit per test64 megabytesinputstandard inputoutputstandard outputYakko, Wakko and Dot, world-famous animaniacs, decided to rest from acting in cartoons, and take a leave to travel a bit. Yakko dreamt to go to
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputImagine that you have a twin brother or sister. Having another person that looks exactly like you seems very unusual. It's hard to say if having
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputOnce Bob got to a sale of old TV sets. There were n TV sets at that sale. TV set with index i costs ai bellars. Some TV sets have a negative price —
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle Petya very much likes computers. Recently he has received a new "Ternatron IV" as a gift from his mother. Unlike other modern computers,
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou've got a 5 × 5 matrix, consisting of 24 zeroes and a single number one. Let's index the matrix rows by numbers from 1 to 5 from top to bottom,
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVitaly has an array of n distinct integers. Vitaly wants to divide this array into three non-empty sets so as the following conditions hold:The
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA boy Valera registered on site Codeforces as Valera, and wrote his first Codeforces Round #300. He boasted to a friend Arkady about winning as
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIlya is a very clever lion, he lives in an unusual city ZooVille. In this city all the animals have their rights and obligations. Moreover, they
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputEmuskald is addicted to Codeforces, and keeps refreshing the main page not to miss any changes in the "recent actions" list. He likes to read
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIlya plays a card game by the following rules.A player has several cards. Each card contains two non-negative integers inscribed, one at the top of
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA kindergarten teacher Natalia Pavlovna has invented a new ball game. This game not only develops the children's physique, but also teaches them
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputEugeny has array a = a1, a2, ..., an, consisting of n integers. Each integer ai equals to -1, or to 1. Also, he has m queries:Query number i is
time limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe Free Meteor Association (FMA) has got a problem: as meteors are moving, the Universal Cosmic Descriptive Humorous Program (UCDHP) needs to add
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPetya loves lucky numbers. Everybody knows that lucky numbers are positive integers whose decimal representation contains only the lucky
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle penguin Polo adores integer segments, that is, pairs of integers [l; r] (l ≤ r).He has a set that consists of n integer segments: [l1; r1], [
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLet us remind you part of the rules of Codeforces. The given rules slightly simplified, use the problem statement as a formal document.In the
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasilisa the Wise from the Kingdom of Far Far Away got a magic box with a secret as a present from her friend Hellawisa the Wise from the Kingdom
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputCan you imagine our life if we removed all zeros from it? For sure we will have many problems.In this problem we will have a simple example if we
time limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarpus has n markers and m marker caps. Each marker is described by two numbers: xi is the color and yi is the diameter. Correspondingly, each