Codeforces Round 444 (Div. 2)


A. Div. 64
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
100010001
Output
yes
Input
100
Output
no
----------------------------------------------------------------------------------------------------
B. Cubes for Masha
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
0 1 2 3 4 5
6 7 8 9 0 1
2 3 4 5 6 7
Output
87
Input
3
0 1 3 5 6 8
1 2 4 5 7 8
2 3 4 6 7 9
Output
98
----------------------------------------------------------------------------------------------------
C. Solution for Cube
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2 5 4 6 1 3 6 2 5 5 1 2 3 5 3 1 1 2 4 6 6 4 3 4
Output
NO
Input
5 3 5 3 2 5 2 5 6 2 6 2 4 4 4 4 1 1 1 1 6 3 6 3
Output
YES
----------------------------------------------------------------------------------------------------
D. Ratings and Reality Shows
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
5 1 1 1 4 0 5
1 1
2 1
3 1
4 0
5 0
Output
6
Input
1 1 2 1 2 1 2
1 0
Output
-1
----------------------------------------------------------------------------------------------------
E. Little Brother
time limit per test: 3 seconds
memory limit per test: 512 megabytes
input: standard input
output: standard output

Examples
Input
2 4 7 13
3
3 0 1
12 4 2
-4 14 2
Output
5.1478150705
Input
-2 3 10 -10
2
7 0 3
-5 -5 2
Output
9.1481831923
----------------------------------------------------------------------------------------------------
F. Row of Models
time limit per test: 2 seconds
memory limit per test: 512 megabytes
input: standard input
output: standard output

Examples
Input
5 4
2 3 5 2 5
Output
NO
Input
5 2
3 6 2 2 1
Output
YES
Input
5 2
5 3 6 5 2
Output
YES
----------------------------------------------------------------------------------------------------
