Thunder Mountain


Submit solution

Points: 8
Time limit: 3.0s
Memory limit: 4M
Java 8 64M
Python 16M

Problem type
Allowed languages
Assembly, C, C++, Haskell, Java, OCaml, Python, Stechec

Markus is building an army to fight the evil Valhalla Sector, so he needs to move some supplies between several of the nearby towns. The woods are full of robbers and other unfriendly folk, so it's dangerous to travel far. As Thunder Mountain's head of security, Lee thinks that it is unsafe to carry supplies for more than 10km without visiting a town. Markus wants to know how far one would need to travel to get from one town to another in the worst case.

Input

The first line of input gives the number of cases, \(N\). \(N\) test cases follow. Each one starts with a line containing \(n\) (the number of towns, \(1<n<101\)). The next \(n\) lines will give the xy-locations of each town in km (integers in the range [0, 1023]). Assume that the Earth is at and the whole 1024x1024 grid is covered by a forest with roads connecting each pair of towns that are no further than 10km away from each other.

Output

For each test case, output the line 'Case #x:', where x is the number of the test case. On the next line, print the maximum distance one has to travel from town A to town B (for some A and B). Round the answer to 4 decimal places. Every answer will obey the formula:

\[\vert ans \times 10^4 - floor(ans \times 10^4) - 0.5 \vert > 10^{-2} \]

If it is impossible to get from some town to some other town, print 'Send Kurdy' instead. Put an empty line after each test case.

Sample Input

2
5
0 0
10 0
10 10
13 10
13 14
2
0 0
10 1

Sample Output

Case #1:
25.0000

Case #2:
Send Kurdy

Comments

There are no comments at the moment.