E. Euclidean Travel with Parallel Universes
time limit per test
2 seconds
memory limit per test
1024 megabytes
input
standard input
output
standard output
Example
Input
1
12 1 2 8 2 3 10 3
Output
4.976414963