2294 - 【POJ Challenge】爬山II

Input

Output

Examples

Input

3

1.000000 1.000000 1.000000 21.213204
10
1000 1000
1000 -1000
1000 1000
1000 -1000
1000 1000
1000 -1000
1000 1000
1000 -1000
1000 1000
1000 -1000

10.0 100.0 150 1.0
2
100 0
100 100

0.5 0.1 100 10
3
1000 0
100 10
100 -10

Output

14.14
IMPOSSIBLE
0.01
Time Limit 1 second
Memory Limit 128 MB
Stats
上一题 下一题