DS-S95-CA2-2

Time Limit: 2 Seconds    Memory Limit: 4096 KB

You can find the related question in the course page.


Input

You can find the related input format in the course page.


Output

You can find the related output format in the course page.


Sample Input

4
0 0 10 10 13 10 20 13
5
1 1 2 2 4 4 8 8 16 16 
6
15 10 25 10 30 8 40 4 50 15 30 30 
0

Sample Output

3
1.41421
5.38516
Submit