|
||||||||||
Mummy MadnessTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 442 Accepted Submission(s): 117 Problem Description During an excursion to the desert at the 2011 ACM-ICPC World Finals, you come across an old Egyptian tomb. Unfortunately, opening the tomb turns out to be a bad idea: all of a sudden, what was just a few moments ago an empty desert has now become a desert crawling with grumpy mummies (you would be grumpy too if you were suddenly awakened after a few thousand years of peaceful sleep).(Fortunately, after solving this problem, you woke up safe and sound in a hotel room in Florida. The enraged mummies had just been a dream. Or had they?) Input The input consists of several test cases. Each test case begins with an integer n (0 <= n <= 10^5) giving the number of mummies in the desert. The following n lines each contain two integers x and y, indicating that there is initially a mummy at coordinates (x, y) of the desert, where x and y are both bounded by 10^6 in absolute value. Your starting position is (0, 0), and no mummy starts at this position. The last test case is followed by a line containing the number 􀀀1. Output For each test case, display its test case number followed by the maximum number of time steps until you are caught (measured as the total number of turns that you get), or the word ˇ°neverˇ± if you can avoid capture indefinitely. Follow the format of the sample output. Sample Input
Sample Output
Source | ||||||||||
|