摘要:B. Making Sequences is Funtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputWe'll defineS(n)for positive integernas follows: the number of then's digits in the decimal base. For example,S(893) = 3,S(114514) = 6.You want to make a consecutiv
阅读全文
摘要:C. Counting Kangaroos is Funtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere arenkangaroos with pockets. Each kangaroo has a size (integer number). A kangaroo can go into another kangaroo's pocket if and only if the size of kangaroo who h
阅读全文
摘要:E -Levko and ArrayTime Limit:2000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:DescriptionLevko has an array that consists of integers:a1, a2, ... , an. But he doesn’t like this array at all.Levko thinks that the beauty of the arrayadirectly depends on value
阅读全文
摘要:B -Free MarketTime Limit:1000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:DescriptionJohn Doe has recently found a "Free Market" in his city — that is the place where you can exchange some of your possessions for other things for free.John knows t
阅读全文
摘要:B. Valera and Contesttime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputValera loves to participate in competitions. Especially in programming contests. Today he has participated in the contest with his team, consisting ofnstudents (including Valera)
阅读全文
摘要:C. Valera and Electionstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe city Valera lives in is going to hold elections to the city Parliament.The city hasndistricts andn - 1bidirectional roads. We know that from any district there is a path al
阅读全文
摘要:G -Jeff and FurikTime Limit:1000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:DescriptionJeff has become friends with Furik. Now these two are going to play one quite amusing game.At the beginning of the game Jeff takes a piece of paper and writes down a per
阅读全文
摘要:I -Apple TreeTime Limit:2000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:DescriptionYou are given a rooted tree withnvertices. In each leaf vertex there's a single integer — the number of apples in this vertex.Theweightof a subtree is the sum of all num
阅读全文
摘要:D -Levko and Array RecoveryTime Limit:1000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:DescriptionLevko loves arraya1, a2, ... , an, consisting of integers, very much. That is why Levko is playing with arraya, performing all sorts of operations with it. Eac
阅读全文
摘要:B. Sereja and Suffixestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputSereja has an arraya, consisting ofnintegersa1,a2,...,an. The boy cannot sit and do nothing, he decided to study an array. Sereja took a piece of paper and wrote outmintegersl1,
阅读全文
摘要:C. Sereja and Algorithmtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputSereja loves all sorts of algorithms. He has recently come up with a new algorithm, which receives a string as an input. Let's represent the input string of the algorithm a
阅读全文
摘要:A -MatrixTime Limit:1000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:DescriptionYou have a string of decimal digitss. Let's definebij = si·sj. Find in matrixbthe number of such rectangles that the sumbijfor all cells(i, j)that are the elements of t
阅读全文
摘要:P -Sereja and ContestTime Limit:2000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:DescriptionDuring the last Sereja's Codesecrof round the server crashed many times, so the round was decided to be made unrated for some participants.Let's assume thatn
阅读全文
摘要:A. Strange Additiontime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputUnfortunately, Vasya can only sum pairs of integers (a,b), such that for any decimal place at least one number has digit0in this place. For example, Vasya can sum numbers505and50,
阅读全文
摘要:A -Pair of NumbersTime Limit:2000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:DescriptionSimon has an arraya1, a2, ..., an, consisting ofnpositive integers. Today Simon asked you to find a pair of integersl, r(1 ≤ l ≤ r ≤ n), such that the following conditi
阅读全文
摘要:I -Biridian ForestTime Limit:2000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:DescriptionYou're a mikemon breeder currently in the middle of your journey to become a mikemon master. Your current obstacle is go through the infamous Biridian Forest.The fo
阅读全文
摘要:D. Block Towertime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAfter too much playing on paper, Iahub has switched to computer games. The game he plays is called "Block Towers". It is played in a rectangular grid withnrows andmcolumns (i
阅读全文
摘要:K -Magic FiveTime Limit:1000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:DescriptionThere is a long platescontainingndigits. Iahub wants to delete some digits (possibly none, but he is not allowed to delete all the digits) to form his "magic number&quo
阅读全文
摘要:L -Black-and-White CubeTime Limit:1000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:DescriptionYou are given a cube of sizek × k × k, which consists of unit cubes. Two unit cubes are considered neighbouring, if they have common face.Your task is to
阅读全文
摘要:O -Ciel and RobotTime Limit:1000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:DescriptionFox Ciel has a robot on a 2D plane. Initially it is located in (0, 0). Fox Ciel code a command to it. The command was represented by strings. Each character ofsis one mo
阅读全文