Codeforces Round 469 (Div. 1)


A. Zebras
time limit per test: 1 second
memory limit per test: 512 megabytes
input: standard input
output: standard output

Examples
Input
0010100
Output
3
3 1 3 4
3 2 5 6
1 7
Input
111
Output
-1
----------------------------------------------------------------------------------------------------
B. A Leapfrog in the Array
time limit per test: 2 seconds
memory limit per test: 512 megabytes
input: standard input
output: standard output

Examples
Input
4 3
2
3
4
Output
3
2
4
Input
13 4
10
5
4
8
Output
13
3
8
9
----------------------------------------------------------------------------------------------------
C. Data Center Maintenance
time limit per test: 1 second
memory limit per test: 512 megabytes
input: standard input
output: standard output

Examples
Input
3 3 5
4 4 0
1 3
3 2
3 1
Output
1
3 
Input
4 5 4
2 1 0 3
4 3
3 2
1 2
1 4
1 3
Output
4
1 2 3 4 
----------------------------------------------------------------------------------------------------
D. Curfew
time limit per test: 2 seconds
memory limit per test: 512 megabytes
input: standard input
output: standard output

Examples
Input
5 1 1
1 0 0 0 4
Output
1
Input
6 1 2
3 8 0 1 0 0
Output
2
----------------------------------------------------------------------------------------------------
E. Binary Cards
time limit per test: 1 second
memory limit per test: 512 megabytes
input: standard input
output: standard output

Examples
Input
1
9
Output
2
1 8
Input
5
-1 3 0 4 7
Output
3
4 -1 4
Input
4
2 -2 14 18
Output
3
-2 2 16
----------------------------------------------------------------------------------------------------
