Problem G
Fence Orthogonality
Evil bunnies are eating Freddy’s vegetables. In order to stop them, he decided to build a fence enclosing all vegetables in his garden. Freddy wants the fence to be as cheap (i.e., short) as possible, but for technical reasons, he can only build rectangular fences. For simplicity, we will assume the vegetables are negligibly small and can be represented by points in a two-dimensional plane.
Input
The input consists of several test cases, at most 50.
The first line of each test case contains one integer
Output
For each test case, output a single line containing one
real number
The answer will be accepted as correct if the difference
between
Sample Input 1 | Sample Output 1 |
---|---|
3 0 0 1 0 0 1 3 10 0 0 10 4 4 4 1 0 0 1 2 1 1 2 |
4 31.112698 5.656854 |