当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

3845:Mummy Madness

题目描述
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?)

输入解释
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 &#1048576;1.
输出解释
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.
输入样例
4
-3 5
3 4
-6 -2
1 -5
1
0 -1
-1
输出样例
Case 1: 4
Case 2: never
来自杭电HDUOJ的附加信息
Recommend

该题目是Virtual Judge题目,来自 杭电HDUOJ

题目来源 2011WorldFinal

源链接: HDU-3845

最后修改于 2020-10-25T23:07:30+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
10000/5000MS(Java/Others) 65536/65536K(Java/Others)