Geometry Special 2018
A. Sledding down the mountain
time limit per test
12 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

See PDF statement in attachment.

Examples
Input
1
0 0 0
1 -1 -1
1 1 1
Output
0.707106781187
Input
3
1 2 1
0 2 2
1 1 1
1 1 1
2 2 2
1 2 1
0 0 -1
1 1 1
0 2 2
Output
1.247219128925
Input
2
1 0 1
0 0 0
1 -1 -1
1 -1 -1
0 0 0
0 -1 1
Output
1.837117307087

B. Pen spinning accident
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

See PDF statement in attachment.

Examples
Input
1 0 0
0 0 1
1 0 0

0 1 0
0 1 0
0 0 1
Output
0.785398163397
Input
1 0 0
0 0 1
1 0 0

0 1 0
0 1 0
0 0 -1
Output
never
Input
0 0 0
1 0 0
0 1 0

0 0 1
0 1 0
-1 0 0
Output
never
Input
1 0 0
-1 0 -1
-1 0 1

0 1 0
0 1 0
0 0 1
Output
0.392699081699
Input
0 0 1
0 -1 1
0 1 1

-1 0 -1
-1 0 0
0 -1 0
Output
0.511669644114
Input
0 -1 0
-1 0 0
0 0 -1

1 0 0
0 0 -1
0 1 0
Output
0.785398163397

C. Polar map
time limit per test
8 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

See PDF statement in attachment.

Examples
Input
3
45 0
-45 0
0 90
Output
0.269064434316
Input
6
0 90
0 180
0 -90
80 -90
80 180
80 90
Output
0.389591701512
Input
3
-85 0
-85 179
0 90
Output
0.207400294880

D. Gold paint optimization
time limit per test
10 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

See PDF statement in attachment.

Examples
Input
2 1
2 0 0
0 2 0
Output
0.50000000
0.50000000
Input
2 2
2 0 0
10 10 10
Output
1.00000000
1.00000000
Input
2 2
2 0 0
0 1 1
Output
0.98985430
1.01014568