摘要:Counting PairTime Limit:1000 msMemory Limit:65535 kBSolved:112Tried:1209SubmitStatusBest SolutionBackDescriptionBob hosts a party and invites N boys and M girls. He gives every boy here a unique number Ni(1 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #inclu...
阅读全文
摘要:King's SanctuaryTime Limit:1000 msMemory Limit:65535 kBSolved:111Tried:840SubmitStatusBest SolutionBackDescriptionThe king found his adherents were building four sanctuaries for him. He is interested about the positions of the sanctuaries and wants to know whether they would form a parallelogram
阅读全文
摘要:System Administratortime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputBob got a job as a system administrator in X corporation. His first task was to connectnservers with the help ofmtwo-way direct connection so that it becomes possible to transmit
阅读全文
摘要:Bargaining Tabletime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputBob wants to put a new bargaining table in his office. To do so he measured the office room thoroughly and drew its plan: Bob's office room is a rectangular roomn × mmeters.
阅读全文
摘要:ZOJ Problem Set - 1016ParencodingsTime Limit:2 Seconds Memory Limit:65536 KBLet S = s1 s2 ... s2n be a well-formed string of parentheses. S can be encoded in two different ways:By an integer sequence P = p1 p2 ... pn where pi is the number of left parentheses before the ith right parenthesis in S (P
阅读全文
摘要:ZOJ Problem Set - 1006Do the UntwistTime Limit:2 Seconds Memory Limit:65536 KBCryptographydeals with methods of secret communication that transform a message (theplaintext) into a disguised form (theciphertext) so that no one seeing the ciphertext will be able to figure out the plaintext except the
阅读全文
摘要:ZOJ Problem Set - 1005JugsTime Limit:2 Seconds Memory Limit:65536 KB Special JudgeIn the movie "Die Hard 3", Bruce Willis and Samuel L. Jackson were confronted with the following puzzle. They were given a 3-gallon jug and a 5-gallon jug and were asked to fill the 5-gallon jug with exactly
阅读全文
摘要:ZOJ Problem Set - 1004Anagrams by StackTime Limit:2 Seconds Memory Limit:65536 KBHow can anagrams result from sequences of stack operations? There are two sequences of stack operators which can convert TROT to TORT:[i i i i o o o oi o i i o o i o]whereistands for Push andostands for Pop. Your progra
阅读全文
摘要:ZOJ Problem Set - 1002Fire NetTime Limit:2 Seconds Memory Limit:65536 KBSuppose that we have a square city with straight streets. A map of a city is a square board with n rows and n columns, each representing a street or a piece of wall.A blockhouse is a small castle that has four openings through w
阅读全文
摘要:ZOJ Problem Set - 3365Integer NumbersTime Limit:1 Second Memory Limit:32768 KB Special JudgeThe boy likes numbers. He has a sheet of paper. He have written a sequence of consecutive integer numbers on the sheet. The boy likes them.But then the girl came. The girl is cruel. She changed some of the nu
阅读全文
摘要:E. Collisionstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputOn a number line there arenballs. At time moment0for each ball the following data is known: its coordinatexi, speedvi(possibly, negative) and weightmi. The radius of the balls can be ig
阅读全文
摘要:Anniversary partyTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3043Accepted Submission(s): 1374Problem DescriptionThere is going to be a party to celebrate the 80-th Anniversary of the Ural State University. The University has a hierarchical stru
阅读全文
摘要:Root3719 - Grass is GreenTime limit: 3.000 secondsThis year exactlynpeople bought land in Squareville_including you. When someone buys land, then the first thing they do is to plant grass on the land; everyone wants to make sure that their grass is greener than the neighbour's. Depending on the
阅读全文
摘要:1069. Prufer CodeTime limit: 0.25 secondMemory limit: 8 MBA tree (i.e. a connected graph without cycles) with vertices is given (N≥2). Vertices of the tree are numbered by the integers 1,…,N. A Prufer code for the tree is built as follows: a leaf (a vertex that is incident to the only edge) with a m
阅读全文
摘要:D -Flying to the MarsTime Limit:1000MSMemory Limit:32768KB64bit IO Format:%I64d & %I64uSubmitStatusPracticeHDU 1800DescriptionIn the year 8888, the Earth is ruled by the PPF Empire . As the population growing , PPF needs to find more land for the newborns . Finally , PPF decides to attack Kscino
阅读全文
摘要:. Hungry Sequencetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputIahub and Iahubina went to a date at a luxury restaurant. Everything went fine until paying for the food. Instead of money, the waiter wants Iahub to write a Hungry sequence consisti
阅读全文
摘要:A. Flipping Gametime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputIahub got bored, so he invented a game to be played on paper.He writes n integers a1, a2, ..., an. Each of those integers can be either 0 or 1. He's allowed to do exactly one move
阅读全文
摘要:B. Sailtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe polar bears are going fishing. They plan to sail from(sx, sy)to(ex, ey). However, the boat can only sail by wind. At each second, the wind blows in one of these directions: east, south, we
阅读全文
摘要:A. Snow Footprintstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere is a straight snowy road, divided intonblocks. The blocks are numbered from 1 tonfrom left to right. If one moves from thei-th block to the(i + 1)-th block, he will leave a ri
阅读全文
摘要:A Simple Problem with IntegersTime Limit:5000MSMemory Limit:131072KB64bit IO Format:%I64d & %I64uSubmitStatusDescriptionYou haveNintegers,A1,A2, ... ,AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number in a given interval. The other
阅读全文