Codeforces Round 168 (Div. 2)


A. Lights Out
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 0
0 0 1
Output
001
010
100
Input
1 0 1
8 8 8
2 0 3
Output
010
011
100
----------------------------------------------------------------------------------------------------
B. Convex Shape
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3 4
WWBW
BWWW
WWWB
Output
NO
Input
3 1
B
B
W
Output
YES
----------------------------------------------------------------------------------------------------
C. k-Multiple Free Set
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
6 2
2 3 6 5 4 10
Output
3
----------------------------------------------------------------------------------------------------
D. Zero Tree
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
1 2
1 3
1 -1 1
Output
3
----------------------------------------------------------------------------------------------------
E. The Last Hole!
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
0 0
1 1
2 2
Output
-1
Input
4
0 0
0 2
2 2
2 0
Output
1.414214
Input
4
0 1
0 -1
-2 0
4 0
Output
2.125000
----------------------------------------------------------------------------------------------------
