Codeforces Beta Round 93 (Div. 2 Only)


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

Examples
Input
2 1
0 0
10 0
Output
0.200000000
Input
5 10
3 1
-5 6
-2 -1
3 2
10 0
Output
6.032163204
Input
6 10
5 0
4 0
6 0
3 0
7 0
2 0
Output
3.000000000
----------------------------------------------------------------------------------------------------
B. Canvas Frames
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
5
2 4 3 2 3
Output
1
Input
13
2 2 4 4 4 4 6 6 6 7 7 9 9
Output
3
Input
4
3 3 3 5
Output
0
----------------------------------------------------------------------------------------------------
C. Hot Bath
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
10 70 100 100 25
Output
99 33
Input
300 500 1000 1000 300
Output
1000 0
Input
143 456 110 117 273
Output
76 54
----------------------------------------------------------------------------------------------------
D. Password
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
fixprefixsuffix
Output
fix
Input
abcdabc
Output
Just a legend
----------------------------------------------------------------------------------------------------
E. E-reader Display
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
5
01110
10010
10001
10011
11110
Output
4
----------------------------------------------------------------------------------------------------
