Codeforces Round 1133 (Div. 1, Div. 2) is coming soon! Register here. ×

D. Delta Rune
time limit per test
4 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output
Example
Input
2 1 3 8
1 4
3
1 6 7
4
2 8
5 10
3 16
0 1000000000000000000
Output
0.16666666666666665741
0.00000000000000000000
0.50000000000000000000
1.00000000000000000000