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

建议使用的浏览器:

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

4977:A simple problem from ZOJ.

题目描述
Long long ago, the evil Dragon reborn from the hell and attempted to control the world. Brave Lott experienced lots of hardships and finally reached the castle of the Dragon. After a fierce battle, the Dragon used the magic power to create countless images, and there are straight ways (lines) between any different images. In order to reseal the Dragon back to the underground, Lott launched the "Spellbinding Circle" creating a Hexagram to limit the movement of the Dragon.

NOTE: images are regarded as points.

The Hexagram is composed of two equilateral triangles, just as the same shape in the picture below. We say R in the picture is the radius of the Hexagram.


More precisely, Lott must create a Hexagram area with centre in his own place to cover all lines between any two images. As we know, we have the same position of Lott and Dragon with (X, Y). And we know the number of the images m, with their positions (X1, Y1), (X2, Y2) ... (Xm, Ym). The centre of the Hexagram is Lott (0,0), The Hexagram will not be able to move, that is, the Hexagram's center must be (0,0). But the Hexagram will be able to rotate.

Now, we want to know the result of the seal. We say the seal is successful if the Hexagram is big enough to cover all lines between images.
输入解释
There are multiple cases (<=1000)in this problem.

The first line will contain only one integer implying the case number.

In the first line for each case, there contains two integer representing the number of Dragon's images m. (3 <= m < = 1000) and the radius of the Hexagram R (1 <= R <= 2000).

Then following m lines, each line contains two integers representing the position of one image Xi and Yi (-10000 <= Xi, Yi <=10000).
输出解释
For each case, output the case number as shown below. Then output one line of "Failed." if the seal failed. Or output “Succeeded.”
输入样例
1
3 2
2 -1
-2 -1
0 3
输出样例
Case #1: Succeeded.
来自杭电HDUOJ的附加信息
Author BJTU
Recommend

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

源链接: HDU-4977

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

共提交 0

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