Codeforces Round 125 (Div. 2)


A. Hexadecimal's theorem
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
Output
1 1 1
Input
13
Output
2 3 8
----------------------------------------------------------------------------------------------------
B. Special Olympics
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
60 60 45 55
80 80 8 32
Output
1
Input
60 60 45 55
80 60 15 25
Output
4
Input
50 50 35 45
90 50 35 45
Output
0
----------------------------------------------------------------------------------------------------
C. About Bacteria
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3 1 3 5
Output
2
Input
1 4 4 7
Output
3
Input
2 2 4 100
Output
0
----------------------------------------------------------------------------------------------------
D. Jumping on Walls
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
7 3
---X--X
-X--XX-
Output
YES
Input
6 2
--X-X-
X--XX-
Output
NO
----------------------------------------------------------------------------------------------------
E. Delivering Carcinogen
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
10 0 1
-10 0 2 8
Output
9.584544103
Input
50 60 10
50 60 20 40
Output
0.000000000
----------------------------------------------------------------------------------------------------
