摘要:A -MAGRIDTime Limit:10000MSMemory Limit:0KB64bit IO Format:%lld & %lluSubmitStatusAppoint description:DescriptionACM International Collegiate Programming Contest, Asia-Amritapuri Site, 2011Problem A: MAGRIDThanks a lot for helping Harry Potter in finding the Sorcerer's Stone of Immortality i
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要:C. Insertion Sorttime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPetya is a beginner programmer. He has already mastered the basics of the C++ language and moved on to learning algorithms. The first algorithm he encountered was insertion sort. Pe
阅读全文
摘要:Maximum AbsurdityTime Limit:2000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:DescriptionReforms continue entering Berland. For example, during yesterday sitting the Berland Parliament approved as much asnlaws (each law has been assigned a unique number from
阅读全文
摘要:Aeroplane chessTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 945Accepted Submission(s): 646Problem DescriptionHzz loves aeroplane chess very much. The chess map contains N+1 grids labeled from 0 to N. Hzz starts at grid 0. For each step he throws
阅读全文
摘要:Tug of WarTime Limit:3000MSMemory Limit:65536KTotal Submissions:8085Accepted:2174DescriptionA tug of war is to be arranged at the local office picnic. For the tug of war, the picnickers must be divided into two teams. Each person must be on one team or the other; the number of people on the two team
阅读全文
摘要:Dividing coinsIt's commonly known that the Dutch have invented copper-wire. Two Dutch men were fighting over a nickel, which was made of copper. They were both so eager to get it and the fighting was so fierce, they stretched the coin to great length and thus created copper-wire.Not commonly kno
阅读全文