Codeforces Round 180 (Div. 1)


A. Parity Game
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
01011
0110
Output
YES
Input
0011
1110
Output
NO
----------------------------------------------------------------------------------------------------
B. Fish Weight
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3 3 3
2 2 2
1 1 3
Output
YES
Input
4 7 9
5 2 7 3
3 5 2 7 3 8 7
Output
NO
----------------------------------------------------------------------------------------------------
C. Splitting the Uniqueness
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
6
12 5 8 3 11 9
Output
YES
6 2 6 0 2 4
6 3 2 3 9 5
----------------------------------------------------------------------------------------------------
D. Color the Carpet
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3 4 4
ENE
NNEE
NEE
ENEN
ENN
Output
YES
1 1 2 2
3 4 1 1
3 3 2 4
----------------------------------------------------------------------------------------------------
E. Mystic Carvings
time limit per test: 3 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4
5 4
1 2
6 7
8 3
Output
2
Input
8
1 7
2 4
3 9
5 11
6 8
10 16
13 15
14 12
Output
6
----------------------------------------------------------------------------------------------------
