|
||||||||||
A simple problem from ZOJ.Time Limit: 12000/6000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 293 Accepted Submission(s): 44 Problem Description 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. Input 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). Output For each case, output the case number as shown below. Then output one line of "Failed." if the seal failed. Or output ¡°Succeeded.¡± Sample Input
Sample Output
Author BJTU Source | ||||||||||
|