Time

13:19:47
23 May 2012
Version for print

Truck Driving

   Umidsh Izadish is a truck driver and wants to drive from a city to another city while there exists a dedicated straight road between each pair of cities in that country. Amount of consumed fuel is the distance between two cities which is computed from their coordinates. There is a gas station in each city, so Umidsh can refuel the gas container of his truck. Your job is to compute the minimum necessary volume of gas container of Umidsh’s Truck.


Specifications

   Input

   The first line of input contains an integer, the number of test cases. Following, there are data for test cases. Each test case begins with a line containing one integer, C (2C200), which is the number of cities. The next C lines each contain two integers x, y (0x, y 1000) representing the coordinate of one city. First city is the source city and second is the destination city of Umidsh.

   Output

   There should be one line for each test case in output. Each line should contain one floating point number which is the minimum necessary volume of truck’s gas container, printed to three decimals.


Problem information

Time Limit: 1 seconds
Memory Limit: 64 MB
Balls for the passed test: 10
Complexity: 60% 10/25

Example

Example input

2
2
0 0
3 4
3
17 4
19 4
18 5

Example output

5.000
1.414


← Subprojects Problems Primes’ Problem →