L. Pillar Path
time limit per test
5 seconds
memory limit per test
512 megabytes
input
standard input
output
standard output
Example
Input
3
3 15 17 1
5 11 3 5
11 10 2 4
13 4 4 1
Output
21.351991750