Codeforces Beta Round 30 (Codeforces format)


A. Accounting
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2 18 2
Output
3
Input
-1 8 3
Output
-2
Input
0 0 10
Output
5
Input
1 16 5
Output
No solution
----------------------------------------------------------------------------------------------------
B. Codeforces World Finals
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
01.01.98
01.01.80
Output
YES
Input
20.10.20
10.02.30
Output
NO
Input
28.02.74
28.02.64
Output
NO
----------------------------------------------------------------------------------------------------
C. Shooting Gallery
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
1
0 0 0 0.5
Output
0.5000000000
Input
2
0 0 0 0.6
5 0 5 0.7
Output
1.3000000000
----------------------------------------------------------------------------------------------------
D. King's Problem?
time limit per test: 3 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3 1
0 1 2 1
1
Output
3.41421356237309490000
Input
3 1
1 0 2 1
1
Output
3.82842712474619030000
Input
4 5
0 5 -1 -5 2
3
Output
14.24264068711928400000
----------------------------------------------------------------------------------------------------
E. Tricky and Clever Password
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
abacaba
Output
1
1 7
Input
axbya
Output
3
1 1
2 1
5 1
Input
xabyczba
Output
3
2 2
4 1
7 2
----------------------------------------------------------------------------------------------------
