QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#43473#4244. Circle ConvertationGuanYunchangAC ✓3ms3868kbC++173.4kb2022-08-09 15:55:082022-08-09 15:55:11

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3824kb

input:

000
011

output:

1
1

result:

ok 1 step(s)

Test #2:

score: 0
Accepted
time: 2ms
memory: 3776kb

input:

0000
1111

output:

2
2
0

result:

ok 2 step(s)

Test #3:

score: 0
Accepted
time: 3ms
memory: 3700kb

input:

110
011

output:

2
0
1

result:

ok 2 step(s)

Test #4:

score: 0
Accepted
time: 0ms
memory: 3732kb

input:

10111
00101

output:

5
2
4
1
4
0

result:

ok 5 step(s)

Test #5:

score: 0
Accepted
time: 1ms
memory: 3768kb

input:

0111
0111

output:

2
1
1

result:

ok 2 step(s)

Test #6:

score: 0
Accepted
time: 1ms
memory: 3788kb

input:

11101
10111

output:

6
0
0
4
1
4
2

result:

ok 6 step(s)

Test #7:

score: 0
Accepted
time: 0ms
memory: 3664kb

input:

1001
0110

output:

2
3
1

result:

ok 2 step(s)

Test #8:

score: 0
Accepted
time: 0ms
memory: 3844kb

input:

00010
11100

output:

5
4
3
1
0
0

result:

ok 5 step(s)

Test #9:

score: 0
Accepted
time: 2ms
memory: 3864kb

input:

11001
10000

output:

5
0
2
3
0
1

result:

ok 5 step(s)

Test #10:

score: 0
Accepted
time: 2ms
memory: 3792kb

input:

11
11

output:

2
0
0

result:

ok 2 step(s)

Test #11:

score: 0
Accepted
time: 2ms
memory: 3732kb

input:

110
110

output:

2
0
0

result:

ok 2 step(s)

Test #12:

score: 0
Accepted
time: 2ms
memory: 3796kb

input:

11111
10110

output:

7
0
2
2
3
0
1
2

result:

ok 7 step(s)

Test #13:

score: 0
Accepted
time: 0ms
memory: 3788kb

input:

11
11

output:

2
0
0

result:

ok 2 step(s)

Test #14:

score: 0
Accepted
time: 2ms
memory: 3804kb

input:

110
000

output:

1
0

result:

ok 1 step(s)

Test #15:

score: 0
Accepted
time: 1ms
memory: 3852kb

input:

01010
01100

output:

4
4
3
0
1

result:

ok 4 step(s)

Test #16:

score: 0
Accepted
time: 2ms
memory: 3732kb

input:

0010
1000

output:

2
0
1

result:

ok 2 step(s)

Test #17:

score: 0
Accepted
time: 2ms
memory: 3792kb

input:

01111
00110

output:

3
1
3
2

result:

ok 3 step(s)

Test #18:

score: 0
Accepted
time: 1ms
memory: 3860kb

input:

01000
11111

output:

10
2
1
4
3
1
0
3
2
2
0

result:

ok 10 step(s)

Test #19:

score: 0
Accepted
time: 0ms
memory: 3820kb

input:

101
011

output:

2
2
1

result:

ok 2 step(s)

Test #20:

score: 0
Accepted
time: 0ms
memory: 3660kb

input:

111
001

output:

1
0

result:

ok 1 step(s)

Test #21:

score: 0
Accepted
time: 2ms
memory: 3796kb

input:

111
001

output:

1
0

result:

ok 1 step(s)

Test #22:

score: 0
Accepted
time: 2ms
memory: 3788kb

input:

11
11

output:

2
0
0

result:

ok 2 step(s)

Test #23:

score: 0
Accepted
time: 2ms
memory: 3788kb

input:

111
010

output:

3
0
0
2

result:

ok 3 step(s)

Test #24:

score: 0
Accepted
time: 2ms
memory: 3848kb

input:

01111
00101

output:

5
1
3
1
4
0

result:

ok 5 step(s)

Test #25:

score: 0
Accepted
time: 2ms
memory: 3804kb

input:

11000100010111001
00011100010101101

output:

38
0
11
14
13
15
10
9
12
11
14
13
16
15
1
0
3
2
4
4
2
3
0
1
15
16
13
14
11
12
9
10
15
13
14
11
12
13
3

result:

ok 38 step(s)

Test #26:

score: 0
Accepted
time: 2ms
memory: 3804kb

input:

1000111101000111010001111001111100110111000011101101010111100011001100011011001110111100101100100
1110100010110101000010101101010101000101111001101110110111000110111110111111000000111101110001001

output:

404
4
6
13
21
23
27
29
34
37
44
48
55
57
62
66
71
74
78
82
84
90
1
0
3
2
5
4
7
6
8
40
39
42
41
44
43
45
54
53
56
55
58
57
60
59
62
61
64
63
66
65
68
67
70
69
72
71
74
73
76
75
78
77
79
52
51
54
53
56
55
58
57
60
59
62
61
64
63
66
65
68
67
70
69
72
71
74
73
76
75
78
77
80
79
82
81
84
83
86
85
87
32
3...

result:

ok 404 step(s)

Test #27:

score: 0
Accepted
time: 2ms
memory: 3796kb

input:

011101101100010101111101111011111111110111111101011111111111111111111111111010110011111111111111111
011010010001000111010100101000000011011011110001001110111100011011011101110000010100000010001110000

output:

435
1
5
8
17
19
23
25
28
30
32
34
36
39
41
43
49
51
53
55
57
59
61
63
65
67
69
71
73
78
82
84
86
88
90
92
94
96
48
47
50
49
52
51
54
53
56
55
58
57
60
59
62
61
64
63
66
65
68
67
70
69
72
71
74
73
75
46
45
48
47
50
49
52
51
54
53
56
55
58
57
60
59
62
61
64
63
66
65
68
67
70
69
72
71
74
73
76
75
78
77...

result:

ok 435 step(s)

Test #28:

score: 0
Accepted
time: 2ms
memory: 3800kb

input:

111111101110111111111111011011111111111001111101111111111111101101101111111111111101100111101110111
011101010100111011000000100000110010001101110011101001011001001101110101010011110111001000010110100

output:

456
0
2
4
8
12
14
16
18
20
22
25
28
30
32
34
36
41
43
47
49
51
53
55
57
59
62
65
68
70
72
74
76
78
80
83
87
89
92
96
39
38
41
40
43
42
44
0
98
2
1
4
3
5
95
94
97
96
0
98
2
1
4
3
6
5
8
7
9
66
64
65
62
63
60
61
58
59
56
57
54
55
52
53
50
51
48
49
46
47
44
45
42
43
40
41
38
39
36
37
34
35
32
33
30
31
2...

result:

ok 456 step(s)

Test #29:

score: 0
Accepted
time: 0ms
memory: 3720kb

input:

1100001001001010001000101111111000011001000111010101000101000100110001100010001001110010111101010010
1011001100010010001011010001111000011111100000001110110101000111100101100111100110110001100111100111

output:

252
0
24
26
28
35
43
64
69
81
88
90
7
6
8
31
30
33
32
35
34
37
36
38
23
22
25
24
27
26
29
28
31
30
33
32
35
34
37
36
39
38
41
40
43
42
44
19
18
21
20
23
22
25
24
27
26
29
28
31
30
33
32
35
34
37
36
39
38
41
40
43
42
45
44
46
15
14
17
16
19
18
21
20
23
22
25
24
27
26
29
28
31
30
33
32
35
34
37
36
39
...

result:

ok 252 step(s)

Test #30:

score: 0
Accepted
time: 2ms
memory: 3660kb

input:

0010010000100010010100110111011100100100011001101010111101100100010001000100001101000110100000000
0001001000111010110110011000000000000110001101011001111100111110101001111100010110010010010111010

output:

478
22
25
29
41
45
52
54
57
78
85
3
2
4
15
14
16
11
10
13
12
15
14
17
16
18
32
31
33
38
37
40
39
42
41
44
43
46
45
47
28
27
30
29
32
31
34
33
36
35
38
37
40
39
42
41
44
43
46
45
48
47
49
82
81
84
83
86
85
87
74
73
76
75
78
77
80
79
82
81
84
83
86
85
88
87
90
89
92
91
94
93
96
95
1
0
3
2
5
4
7
6
9
8
...

result:

ok 478 step(s)

Test #31:

score: 0
Accepted
time: 0ms
memory: 3792kb

input:

1111111111111111110111101001111111111101101111110101111111011111011010101111111000111110111101111111
1010001000101100000111011011100011000010111111001000011100010100110100110101111101100011101101100001

output:

340
0
2
4
6
8
10
12
14
16
19
21
27
29
31
33
35
39
42
44
46
51
53
55
59
61
65
72
74
76
82
84
88
90
93
95
97
25
24
27
26
29
28
31
30
33
32
35
34
36
64
63
66
65
67
58
57
60
59
62
61
64
63
66
65
68
67
69
50
49
52
51
54
53
56
55
58
57
60
59
62
61
64
63
66
65
68
67
70
69
72
71
74
73
76
75
77
87
86
89
88
9...

result:

ok 340 step(s)

Test #32:

score: 0
Accepted
time: 1ms
memory: 3860kb

input:

11011111110011110111111110101111011111111101111111111100110111111111101111110111101110011111111111
00110101011110111111001000001101011101001011100100011011111101111111111010111011001011110110010111

output:

336
0
3
5
7
12
14
17
19
21
23
28
30
33
35
37
39
43
45
47
49
51
56
59
61
63
65
67
70
72
74
77
79
82
87
89
91
93
95
10
9
12
11
14
13
16
15
18
17
20
19
22
21
24
23
25
54
53
56
55
58
57
60
59
62
61
64
63
66
65
68
67
70
69
72
71
74
73
76
75
78
77
80
79
82
81
83
42
41
44
43
46
45
48
47
50
49
52
51
54
53
5...

result:

ok 336 step(s)

Test #33:

score: 0
Accepted
time: 2ms
memory: 3796kb

input:

1111111111111011111111110111110011110111111111111110011110111110111111111111111111111111011111011
1100010001010000111110100100000010010101001101000101110101010001010001101111101000100001110110011

output:

521
0
2
4
6
8
10
14
16
18
20
22
25
27
32
34
37
39
41
43
45
47
49
53
55
58
60
64
66
68
70
72
74
76
78
80
82
84
86
89
91
95
13
12
15
14
17
16
19
18
21
20
23
22
25
24
27
26
28
63
62
65
64
67
66
69
68
71
70
73
72
75
74
77
76
79
78
81
80
83
82
85
84
87
86
89
88
91
90
92
44
42
43
40
41
38
39
36
37
34
35
3...

result:

ok 521 step(s)

Test #34:

score: 0
Accepted
time: 2ms
memory: 3732kb

input:

11111011110111111011010111111111111111111111011101111011011111011111111111101011110111011110110111
00110000011101101011001101111010011011101100101101011111100111110101111100101101000101000100011000

output:

242
0
2
6
8
11
13
15
18
23
25
27
29
31
33
35
37
39
41
45
49
51
54
57
59
63
65
67
69
71
73
78
80
83
87
89
92
95
5
4
7
6
9
8
11
10
13
12
15
14
17
16
19
18
20
62
61
64
63
66
65
68
67
70
69
72
71
74
73
75
48
47
50
49
52
51
54
53
56
55
58
57
60
59
62
61
64
63
66
65
68
67
70
69
72
71
74
73
76
75
78
77
80
...

result:

ok 242 step(s)

Test #35:

score: 0
Accepted
time: 2ms
memory: 3724kb

input:

1011110110100010001111101111110100111111000011110011101111010010001110000101001001100100000110100000
1011000011011001101011111101100110011111110101010011100111100011010111111010001000101110111100111010

output:

440
2
4
7
18
20
24
26
28
34
36
38
44
46
50
54
56
66
81
91
23
22
25
24
27
26
29
28
30
53
52
55
54
57
56
58
69
68
71
70
72
63
62
65
64
67
66
69
68
71
70
73
72
74
79
78
81
80
83
82
84
95
94
97
96
15
14
17
16
19
18
21
20
23
22
25
24
27
26
29
28
31
30
33
32
35
34
37
36
39
38
41
40
43
42
45
44
47
46
49
48...

result:

ok 440 step(s)

Test #36:

score: 0
Accepted
time: 1ms
memory: 3808kb

input:

010101100001010101011101111111110011000100110000001010100111010010110000101010110101011100011000010
011101001001000111001011000101010110001010011011101010011010110011101111011110101001000011011010110

output:

590
5
19
23
25
27
29
34
42
57
66
78
85
91
40
39
42
41
44
43
46
45
48
47
49
32
31
34
33
36
35
38
37
40
39
42
41
44
43
46
45
48
47
50
49
51
22
21
24
23
26
25
28
27
30
29
32
31
34
33
36
35
38
37
40
39
42
41
44
43
46
45
48
47
50
49
52
51
53
62
61
63
60
59
62
61
64
63
66
65
68
67
70
69
71
18
17
20
19
22
...

result:

ok 590 step(s)

Test #37:

score: 0
Accepted
time: 2ms
memory: 3768kb

input:

0001111100101010110001110111010011000001110110110111110001011000001000001000100101010111101110010
1101001110010100111110010010110010101110111000100010100000000111011001000101100011100100101001110

output:

489
3
5
16
21
25
32
39
43
46
49
51
59
85
87
90
8
7
9
15
14
17
16
19
18
21
20
22
13
12
15
14
17
16
19
18
21
20
23
22
25
24
26
58
57
60
59
62
61
64
63
65
54
53
56
55
58
57
60
59
62
61
64
63
66
65
68
67
70
69
71
42
41
44
43
46
45
48
47
50
49
52
51
54
53
56
55
58
57
60
59
62
61
64
63
66
65
68
67
70
69
7...

result:

ok 489 step(s)

Test #38:

score: 0
Accepted
time: 2ms
memory: 3788kb

input:

01111110110001001101000001110011111100001110010111001111111010011100110011110011111000000001100011
11010010101001010101001001101001110000001011100011111111010001111101111011110000110100001001100111

output:

277
1
3
5
8
16
25
30
32
34
40
47
52
54
56
63
68
72
74
78
80
91
96
28
27
30
29
32
31
34
33
36
35
38
37
40
39
41
50
49
52
51
54
53
56
55
57
46
45
48
47
50
49
52
51
54
53
56
55
58
57
59
66
65
68
67
70
69
72
71
74
73
76
75
78
77
80
79
81
20
19
22
21
24
23
26
25
28
27
30
29
32
31
34
33
36
35
38
37
40
39
...

result:

ok 277 step(s)

Test #39:

score: 0
Accepted
time: 2ms
memory: 3796kb

input:

1101111111111111111111111111110101011111011111111111111110100011111111111011011011111111111111111
0001111111101001111100101111110101100101110111101111001000101011000111001001000011000100000010100

output:

411
0
3
5
7
9
11
13
15
17
19
21
23
25
27
35
37
41
43
45
47
49
51
53
55
62
64
66
68
70
74
77
80
82
84
86
88
90
92
94
40
39
42
41
44
43
46
45
48
47
50
49
52
51
54
53
56
55
57
34
33
36
35
38
37
40
39
42
41
44
43
46
45
48
47
50
49
52
51
54
53
56
55
58
57
60
59
62
61
64
63
66
65
68
67
70
69
71
32
31
34
3...

result:

ok 411 step(s)

Test #40:

score: 0
Accepted
time: 2ms
memory: 3796kb

input:

100001110110001011101000110101111101110000011011110101110110101101010001000000101010011100010001100
100010100101000100110010011011101010100110011001100100110110110101011111010010000010100100110100011

output:

477
5
9
16
24
29
31
35
43
46
48
53
57
62
85
95
1
0
3
2
5
4
6
21
20
23
22
25
24
26
19
18
21
20
23
22
25
24
27
26
29
28
31
30
32
15
14
17
16
19
18
21
20
23
22
25
24
27
26
29
28
31
30
33
32
35
34
36
56
55
58
57
59
72
71
74
73
76
75
77
68
67
70
69
72
71
74
73
76
75
78
77
79
66
65
68
67
70
69
72
71
74
73...

result:

ok 477 step(s)

Test #41:

score: 0
Accepted
time: 0ms
memory: 3728kb

input:

1101110100100010110100001111110011000001000101110011011110100011100000001001111000100001111100111
0011000111001010010100011111001100110010001010011011101110110100000100110011101000110001111100011

output:

316
0
3
16
24
26
28
32
45
50
53
55
62
75
77
87
89
94
8
7
9
6
5
8
7
10
9
12
11
13
48
47
50
49
52
51
54
53
56
55
57
44
43
46
45
48
47
50
49
52
51
54
53
56
55
58
57
60
59
62
61
63
40
39
42
41
44
43
46
45
48
47
50
49
52
51
54
53
56
55
58
57
60
59
62
61
64
63
66
65
68
67
70
69
71
20
19
22
21
24
23
26
25
...

result:

ok 316 step(s)

Test #42:

score: 0
Accepted
time: 0ms
memory: 3804kb

input:

1111101111111111101110111011111111001111111111111101101011111011101101100111110101111011001111111101
0010000011001010110001100111111010001101110100000010111001100100001001111001101011111111011110011111

output:

277
0
2
6
8
10
12
14
18
22
26
28
30
32
36
38
40
42
44
46
48
51
56
58
62
66
69
73
75
81
83
86
90
92
94
96
65
64
67
66
69
68
71
70
73
72
75
74
76
61
60
63
62
65
64
67
66
69
68
71
70
73
72
75
74
77
76
78
55
54
57
56
59
58
61
60
63
62
65
64
67
66
69
68
71
70
73
72
75
74
77
76
79
78
81
80
83
82
85
84
87
...

result:

ok 277 step(s)

Test #43:

score: 0
Accepted
time: 1ms
memory: 3808kb

input:

1111111101111111111011111001111111111111111111111111111111111011101111111111111111111011111011111
0001111111100100010101011101010111110100110111100110110000010001011011100111000100011001110110101

output:

570
0
2
4
6
9
11
13
15
17
20
22
27
29
31
33
35
37
39
41
43
45
47
49
51
53
55
57
59
62
66
68
70
72
74
76
78
80
82
86
88
92
94
0
96
2
1
4
3
6
5
8
7
10
9
12
11
14
13
16
15
18
17
20
19
22
21
23
91
90
93
92
95
94
0
96
2
1
4
3
6
5
8
7
10
9
12
11
14
13
16
15
18
17
20
19
22
21
24
23
26
25
28
27
30
29
32
31
...

result:

ok 570 step(s)

Test #44:

score: 0
Accepted
time: 0ms
memory: 3864kb

input:

101111111111111111111011111111111111111111111011101011001010110101111111111001111010111010110111111
001111001100000101101100011100011001000010000100101010110110101000101011011010110111000000100100111

output:

498
2
4
6
8
10
12
14
16
18
22
24
26
28
30
32
34
36
38
40
42
46
52
60
65
67
69
71
73
77
79
84
90
93
95
97
59
58
61
60
62
89
88
91
90
93
92
95
94
97
96
98
87
86
89
88
91
90
93
92
95
94
97
96
0
98
2
1
4
3
6
5
8
7
10
9
12
11
14
13
16
15
18
17
19
83
82
85
84
87
86
89
88
91
90
93
92
95
94
97
96
0
98
2
1
4...

result:

ok 498 step(s)

Test #45:

score: 0
Accepted
time: 2ms
memory: 3796kb

input:

1000010000001010111001000001100000001100000101010011100101011100011110001111000100010110110011110
1100010000110000110011101001010011010010011110111101110110010000010011010010111111000110001100010

output:

393
16
27
36
50
59
65
67
72
74
85
88
92
94
1
0
3
2
4
19
18
20
15
14
17
16
19
18
21
20
23
22
25
24
27
26
29
28
31
30
33
32
35
34
37
36
39
38
41
40
42
13
12
15
14
17
16
19
18
21
20
23
22
25
24
27
26
29
28
31
30
33
32
35
34
37
36
39
38
41
40
43
42
44
48
47
50
49
51
84
83
86
85
88
87
90
89
92
91
94
93
9...

result:

ok 393 step(s)

Test #46:

score: 0
Accepted
time: 2ms
memory: 3756kb

input:

000011011000011100110010000100001010011110011010101010101000000010000010100001011011000001111010101
110111101011101011100010011100001001000001001110011110000000010101001011101001000110010101100110001

output:

633
4
7
13
18
37
39
43
79
82
89
91
16
15
18
17
20
19
21
28
27
30
29
31
73
72
75
74
76
0
98
2
1
4
3
6
5
8
7
10
9
12
11
14
13
16
15
18
17
20
19
22
21
24
23
26
25
28
27
30
29
32
31
33
97
96
0
98
2
1
4
3
6
5
8
7
10
9
12
11
14
13
16
15
18
17
20
19
22
21
24
23
26
25
28
27
30
29
32
31
34
33
36
35
38
37
40
...

result:

ok 633 step(s)

Test #47:

score: 0
Accepted
time: 2ms
memory: 3796kb

input:

1100010100001010010001000110001010110111111001101001100010110011011000000000010001011110011110110
0000001101110000100101010000000100100111001000110001111110001110111001000010001100100010111000101

output:

462
0
25
34
37
39
41
45
51
58
62
65
83
85
89
91
94
8
7
10
9
11
6
5
8
7
10
9
12
11
13
22
21
24
23
26
25
28
27
29
18
17
20
19
22
21
24
23
26
25
28
27
30
29
31
57
56
59
58
61
60
63
62
65
64
67
66
69
68
71
70
73
72
75
74
76
49
48
51
50
53
52
55
54
57
56
59
58
61
60
63
62
65
64
67
66
69
68
71
70
73
72
75...

result:

ok 462 step(s)

Test #48:

score: 0
Accepted
time: 0ms
memory: 3732kb

input:

1110010110111100101101100001110111111101010001110010100010110001010101110110100101000000100101011100
0001100101100001000110110000010010010100000010110111100101110110001010110100011000110011010100010100

output:

243
0
7
10
12
18
21
27
31
33
35
45
58
69
73
95
3
2
4
17
16
19
18
21
20
23
22
25
24
27
26
28
48
47
49
42
41
44
43
46
45
48
47
50
49
51
40
39
42
41
44
43
46
45
48
47
50
49
52
51
54
53
55
72
71
74
73
75
82
81
84
83
86
85
87
94
93
80
79
82
81
84
83
86
85
88
87
68
67
70
69
72
71
35
36
33
34
31
32
29
30
2...

result:

ok 243 step(s)

Test #49:

score: 0
Accepted
time: 2ms
memory: 3864kb

input:

1001111111111111111111110110111111111111111110111011101110101111111111101111111111011111111111111111
1001100101101101100100101011010001001001100100111011100010101111101111000111101000010000101001111111

output:

208
3
5
7
9
11
13
15
17
19
21
25
28
30
32
34
36
38
40
42
46
50
54
60
62
64
66
68
72
74
76
78
80
83
85
87
89
91
93
95
97
99
24
23
26
25
28
27
30
29
32
31
34
33
36
35
38
37
40
39
42
41
43
71
70
73
72
75
74
77
76
79
78
81
80
83
82
85
84
87
86
89
88
59
58
61
60
63
62
65
64
67
66
69
68
71
70
73
72
75
74
...

result:

ok 208 step(s)

Test #50:

score: 0
Accepted
time: 2ms
memory: 3800kb

input:

11011111111111111111111011100111111010111111111111111111100111011111101110110111101011101101100111
11101000001000110011111011100101111000000111010111111100101011000000000100011011000110100010001001

output:

257
0
3
5
7
9
11
13
15
17
19
21
24
29
31
33
38
40
42
44
46
48
50
52
54
59
63
65
67
70
74
77
79
84
88
91
95
57
56
59
58
60
87
86
89
88
91
90
93
92
95
94
96
83
82
85
84
87
86
89
88
73
72
75
74
77
76
79
78
81
80
83
82
85
84
37
36
39
38
41
40
43
42
45
44
47
46
49
48
51
50
53
52
55
54
24
25
22
23
20
21
1...

result:

ok 257 step(s)

Test #51:

score: 0
Accepted
time: 2ms
memory: 3772kb

input:

001001111111001100000011111111110100010110011011110001011011011000000010000111010100011111001011110
101010101011110010101010010110001101101101100011010100100010111000011011100011010100111000101111100

output:

433
5
7
9
14
22
24
26
28
30
39
43
46
48
55
58
61
75
85
87
94
96
3
2
5
4
7
6
9
8
10
54
53
56
55
58
57
60
59
62
61
64
63
66
65
68
67
69
90
89
91
82
81
84
83
86
85
88
87
90
89
92
91
94
93
96
95
98
97
1
0
3
2
5
4
7
6
9
8
11
10
13
12
15
14
17
16
19
18
21
20
23
22
25
24
27
26
29
28
31
30
32
80
79
82
81
84...

result:

ok 433 step(s)

Test #52:

score: 0
Accepted
time: 2ms
memory: 3800kb

input:

11001110101111101011111111111111111101111111111111111111111110111111110111101111111111111011111110
11101010000000101110110101011010000100011101011000001011111010001001011100111011011000111000111110

output:

316
0
4
10
12
18
20
22
24
26
28
30
32
34
37
39
41
43
45
47
49
51
53
55
57
59
62
64
66
68
71
73
76
78
80
82
84
86
90
92
94
17
16
19
18
21
20
23
22
25
24
27
26
29
28
31
30
33
32
35
34
37
36
39
38
41
40
43
42
45
44
47
46
49
48
51
50
53
52
55
54
57
56
59
58
61
60
63
62
65
64
67
66
69
68
71
70
73
72
75
7...

result:

ok 316 step(s)

Test #53:

score: 0
Accepted
time: 2ms
memory: 3848kb

input:

11110100000011001000100011001111011100101110101110111011110011010001011110000001101011110011011001
11110010111110111011010111011111010111000010111000001000110010100111001101110010101111111101100011

output:

279
0
2
12
24
28
30
33
40
46
50
54
56
60
69
71
79
84
86
90
93
6
5
8
7
10
9
12
11
14
13
15
21
20
23
22
25
24
27
26
29
28
31
30
33
32
34
53
52
55
54
57
56
59
58
61
60
62
49
48
51
50
53
52
55
54
57
56
59
58
61
60
63
62
65
64
66
83
82
85
84
87
86
89
88
91
90
93
92
95
94
96
45
44
47
46
49
48
51
50
53
52
...

result:

ok 279 step(s)

Test #54:

score: 0
Accepted
time: 0ms
memory: 3796kb

input:

111110001000100010010001101100000100110011101101010011100000101110010001001101101100110101001011011
010111011110011001001001001111011001011110110010100010000011100100111110001011001001000001010010001

output:

410
0
2
23
26
36
40
44
52
62
74
77
80
84
94
97
17
16
18
13
12
15
14
17
16
19
18
21
20
23
22
25
24
27
26
29
28
31
30
32
43
42
45
44
46
9
8
11
10
13
12
15
14
17
16
19
18
21
20
23
22
25
24
27
26
29
28
31
30
33
32
35
34
37
36
39
38
41
40
43
42
45
44
47
46
48
65
64
66
61
60
63
62
65
64
67
66
69
68
70
55
...

result:

ok 410 step(s)

Test #55:

score: 0
Accepted
time: 0ms
memory: 3824kb

input:

0000100011000001100101111000011111101100110100001000110110010011111011001111111011111100101110011
1001101001110100101011010010001110101000111000100000010001001001010100100010101110111010110111001

output:

442
8
15
21
23
29
31
33
36
40
52
55
62
64
68
72
74
76
80
82
84
90
95
5
4
7
6
9
8
11
10
13
12
15
14
17
16
18
44
43
46
45
47
60
59
62
61
64
63
65
93
92
95
94
0
96
2
1
4
3
6
5
8
7
10
9
12
11
14
13
16
15
18
17
20
19
22
21
24
23
26
25
28
27
30
29
32
31
34
33
36
35
38
37
40
39
42
41
44
43
46
45
48
47
50
4...

result:

ok 442 step(s)

Test #56:

score: 0
Accepted
time: 2ms
memory: 3768kb

input:

11010001011100101100111100101011101100010100000010000001001010101110111110110110111000001111110010
11111001110010111100011110100111101101001101001110100101100001001001101111101011001110001110101111

output:

214
0
9
16
20
22
30
34
64
68
70
74
77
80
88
90
92
12
11
13
8
7
10
9
12
11
14
13
16
15
18
17
20
19
22
21
24
23
25
4
3
6
5
8
7
10
9
12
11
14
13
16
15
18
17
20
19
22
21
24
23
26
25
27
33
32
35
34
37
36
38
42
41
44
43
46
45
47
56
55
57
83
82
85
84
87
86
89
88
73
72
75
74
77
76
79
78
81
80
83
82
67
66
69...

result:

ok 214 step(s)

Test #57:

score: 0
Accepted
time: 2ms
memory: 3720kb

input:

11111010111111110101110011111101111111111111110111111101010111011110111111110111011110111100111110
11100001101110010011001101100001000111110000111001001101111110011100101110110000011101001001010101

output:

352
0
2
8
10
12
14
19
24
26
28
31
33
35
37
39
41
43
47
49
51
59
63
65
68
70
72
74
77
81
83
86
88
92
94
7
6
9
8
11
10
13
12
15
14
16
5
4
7
6
9
8
11
10
13
12
15
14
17
16
19
18
20
80
79
82
81
84
83
86
85
88
87
90
89
92
91
94
93
95
62
61
64
63
66
65
68
67
70
69
72
71
74
73
76
75
78
77
80
79
82
81
84
83
...

result:

ok 352 step(s)

Test #58:

score: 0
Accepted
time: 2ms
memory: 3848kb

input:

1111101010111111111110011111111011111111111011111011111111111111010111011101110100111111111111111
1001100000001110111011010111101000111011100101001010011000000110000111111101001101111000110001000

output:

509
0
2
10
12
14
16
18
23
25
27
29
32
34
36
38
40
44
46
50
52
54
56
58
60
62
67
71
75
82
84
86
88
90
92
94
49
48
51
50
53
52
55
54
57
56
59
58
61
60
63
62
64
43
42
45
44
47
46
49
48
51
50
53
52
55
54
57
56
59
58
61
60
63
62
65
64
67
66
68
21
20
23
22
25
24
27
26
29
28
31
30
33
32
35
34
37
36
39
38
4...

result:

ok 509 step(s)

Test #59:

score: 0
Accepted
time: 2ms
memory: 3796kb

input:

0111011110011010101111000110001011100000101000101111010111000110101101100110000000100100000100101
1100110011100111110000011100100101111000001011100000101110111110011011100000101010111111110101011

output:

522
1
5
7
11
18
20
25
32
48
50
55
61
66
69
73
4
3
6
5
8
7
10
9
12
11
13
47
46
49
48
51
50
52
43
42
45
44
47
46
49
48
51
50
53
52
55
54
56
83
82
84
65
64
67
66
69
68
71
70
73
72
75
74
77
76
79
78
81
80
83
82
85
84
87
86
89
88
90
0
96
2
1
4
3
6
5
8
7
10
9
12
11
14
13
15
95
94
0
96
2
1
4
3
6
5
8
7
10
9...

result:

ok 522 step(s)

Test #60:

score: 0
Accepted
time: 2ms
memory: 3732kb

input:

111110111100101111111111111111111111111111111111111111111111010011111111111111101111011111100001111
000111110010011111111110110101101100101111111011001100100101001110000000010110100010011000001100000

output:

268
0
2
6
8
14
16
18
20
22
24
26
28
30
32
34
36
38
40
42
44
46
48
50
52
54
56
58
64
66
68
70
72
74
76
80
82
85
87
89
95
97
13
12
15
14
17
16
19
18
21
20
23
22
25
24
27
26
29
28
31
30
33
32
35
34
37
36
39
38
41
40
43
42
45
44
47
46
49
48
51
50
53
52
55
54
57
56
59
58
60
79
78
81
80
83
82
85
84
87
86
...

result:

ok 268 step(s)

Test #61:

score: 0
Accepted
time: 2ms
memory: 3860kb

input:

0111110110111111111111111111111101111111111111111111110101111101111111111111111001100110111111111
0100111010000000110101111010011111001111000000100000101010000000010010100001011100101101100011100

output:

396
1
3
7
10
12
14
16
18
20
22
24
26
28
30
33
35
37
39
41
43
45
47
49
51
57
59
63
65
67
69
71
73
75
77
81
85
88
90
92
94
62
61
64
63
66
65
68
67
70
69
72
71
74
73
76
75
78
77
80
79
82
81
84
83
86
85
88
87
90
89
92
91
94
93
95
56
55
58
57
60
59
62
61
64
63
66
65
68
67
70
69
72
71
74
73
76
75
78
77
80...

result:

ok 396 step(s)

Test #62:

score: 0
Accepted
time: 2ms
memory: 3788kb

input:

1101111111011111001111111101111111111001111111111111111111001111101101011111111111111111111011111
0101111101011011010111000010111100110010000000100010101010110011001001111001010011000100000010111

output:

489
0
3
5
7
11
13
18
20
22
24
27
29
31
33
35
39
41
43
45
47
49
51
53
55
60
62
66
71
73
75
77
79
81
83
85
87
89
92
94
58
57
60
59
62
61
63
70
69
72
71
74
73
76
75
78
77
80
79
82
81
84
83
86
85
88
87
90
89
92
91
94
93
95
16
15
18
17
20
19
22
21
24
23
26
25
28
27
30
29
32
31
34
33
36
35
38
37
40
39
42
...

result:

ok 489 step(s)

Test #63:

score: 0
Accepted
time: 2ms
memory: 3804kb

input:

1111101111101101101101101011101111111111111111111110101111110011111111011111010111111110111111111111
1110111011001110110010110000101101001100010010110011000110100111101010001101010101111010010100111000

output:

304
0
2
6
8
12
15
18
21
26
30
32
34
36
38
40
42
44
46
48
54
56
58
62
64
66
68
71
73
79
81
83
85
88
90
92
94
96
98
53
52
55
54
57
56
59
58
61
60
63
62
65
64
67
66
69
68
71
70
73
72
74
51
50
53
52
55
54
57
56
59
58
61
60
63
62
65
64
67
66
69
68
71
70
73
72
75
74
76
29
28
31
30
33
32
35
34
37
36
39
38
...

result:

ok 304 step(s)

Test #64:

score: 0
Accepted
time: 2ms
memory: 3792kb

input:

1100111111101000100111011011111001101100101100111111101110101111001010111001101000001010011010010
1001011100011100011010001110100010000001011111100101001111100110010010001010011010011011001001101

output:

565
0
4
6
8
19
23
26
28
33
36
42
46
48
50
54
60
62
70
75
89
17
16
19
18
20
93
92
94
87
86
89
88
91
90
93
92
95
94
0
96
2
1
4
3
6
5
8
7
9
85
84
87
86
89
88
91
90
93
92
95
94
0
96
2
1
4
3
6
5
8
7
10
9
11
79
78
81
80
83
82
85
84
87
86
89
88
91
90
93
92
95
94
0
96
2
1
4
3
6
5
8
7
10
9
12
11
14
13
16
15
...

result:

ok 565 step(s)

Test #65:

score: 0
Accepted
time: 2ms
memory: 3800kb

input:

1111001110111101011100110001101111111111010110110110110000110001001001000110100111100010111000010
1110011110011101110110111111010011011000001101110000110111000110110000101011011010011110100101010

output:

442
0
2
6
10
12
17
22
27
30
32
34
36
38
43
46
49
52
58
73
79
81
88
9
8
11
10
13
12
14
64
63
65
70
69
72
71
74
73
75
42
41
44
43
46
45
48
47
50
49
52
51
54
53
56
55
58
57
60
59
62
61
64
63
66
65
68
67
70
69
72
71
74
73
76
75
78
77
80
79
82
81
84
83
85
20
19
22
21
24
23
26
25
28
27
30
29
32
31
34
33
3...

result:

ok 442 step(s)

Test #66:

score: 0
Accepted
time: 1ms
memory: 3860kb

input:

11111111110111111111111111111111010111010111110101110011111111111111111111111111101111111111111111
10001010110101011001100011000111010100100011011110010010010001010001000001001101110101011110101010

output:

287
0
2
4
6
8
11
13
15
17
19
21
23
25
27
29
35
41
43
49
54
56
58
60
62
64
66
68
70
72
74
76
78
82
84
86
88
90
92
94
96
52
51
54
53
56
55
58
57
60
59
62
61
64
63
66
65
68
67
70
69
72
71
74
73
76
75
78
77
79
48
47
50
49
52
51
54
53
56
55
58
57
60
59
62
61
64
63
66
65
68
67
70
69
72
71
46
45
48
47
50
4...

result:

ok 287 step(s)

Test #67:

score: 0
Accepted
time: 2ms
memory: 3860kb

input:

11000010100101010000100100000110010100111010110000010011000001010011101101111101010100111111111110
00011101010000111001000001001011110010111111001100110100110001110010001001011101100011001100010100

output:

225
0
29
38
44
54
66
70
73
75
86
88
90
92
94
9
8
10
7
6
9
8
11
10
12
16
15
18
17
19
36
35
38
37
39
34
33
36
35
38
37
40
39
41
64
63
66
65
67
84
83
86
85
88
87
90
89
92
91
94
93
95
82
81
84
83
86
85
88
87
90
89
92
91
94
93
80
79
82
81
84
83
86
85
88
87
90
89
92
91
62
61
64
63
66
65
68
67
70
69
72
71
...

result:

ok 225 step(s)

Test #68:

score: 0
Accepted
time: 2ms
memory: 3776kb

input:

111111111111111101111101111111110001111010111111111010111011110100111111111110111111111111011110111
011011100000100001101101100100111111101100001001011101111100011001001010001111101110110100011110111

output:

320
0
2
4
6
8
10
12
14
17
19
23
25
27
29
35
37
42
44
46
48
54
58
60
66
68
70
72
74
78
80
82
84
86
88
91
93
96
32
31
34
33
36
35
38
37
39
22
21
24
23
26
25
28
27
30
29
32
31
34
33
36
35
38
37
40
39
42
41
44
43
46
45
48
47
49
57
56
59
58
61
60
62
0
98
2
1
4
3
6
5
8
7
10
9
12
11
14
13
16
15
18
17
20
19...

result:

ok 320 step(s)

Test #69:

score: 0
Accepted
time: 2ms
memory: 3796kb

input:

1111110111110111011111111111111111111101011110101101011111101101111111111011001110111111111111111
0101101010011010110001110111100100100011011110101101011110110111001100110111001001000111111101100

output:

407
0
2
4
7
9
13
17
19
21
23
25
27
29
31
33
35
41
43
48
53
55
57
60
63
65
67
69
71
74
78
82
84
86
88
90
92
94
40
39
42
41
44
43
45
52
51
54
53
56
55
58
57
60
59
62
61
64
63
66
65
68
67
70
69
72
71
74
73
76
75
78
77
79
38
37
40
39
42
41
44
43
46
45
48
47
50
49
52
51
54
53
56
55
58
57
60
59
62
61
64
6...

result:

ok 407 step(s)

Test #70:

score: 0
Accepted
time: 0ms
memory: 3664kb

input:

00110111110001101100100101100000001110000110111011011001001110111000010011101111111000111011010100
00010000001001100010100101111111101000110100011100101101001010110110110110110010011011001111001101

output:

179
2
5
7
13
16
25
34
41
44
48
51
58
62
72
76
78
80
86
90
10
9
12
11
14
13
16
15
18
17
19
24
23
26
25
28
27
30
29
32
31
34
33
35
47
46
49
48
51
50
53
52
54
65
64
67
66
68
89
88
91
90
92
83
82
85
84
87
86
89
88
91
90
93
92
94
58
59
72
73
70
71
68
69
66
67
64
65
62
63
60
61
96
94
95
92
93
90
91
88
89
...

result:

ok 179 step(s)

Test #71:

score: 0
Accepted
time: 2ms
memory: 3772kb

input:

1110100111001010001110110011111100001011110001101110101101001010110111111101000101010000110011000
0110100000111110101000010110111101011000111101101101101100100101101111000110000110010000001000111

output:

472
0
7
18
22
26
28
30
38
40
45
48
54
64
67
69
71
88
92
5
4
7
6
8
53
52
55
54
56
63
62
65
64
67
66
69
68
71
70
72
61
60
63
62
65
64
67
66
69
68
71
70
73
72
74
51
50
53
52
55
54
57
56
59
58
61
60
63
62
65
64
67
66
69
68
71
70
73
72
75
74
77
76
78
37
36
39
38
41
40
43
42
45
44
47
46
49
48
51
50
53
52
...

result:

ok 472 step(s)

Test #72:

score: 0
Accepted
time: 1ms
memory: 3860kb

input:

101111001111011101110101111101101101111110111111011111111100111111111111110111111111111110111101001
110100110010011001100100000011111011000001000010010110100010010111110110100000100000000000101101111

output:

347
2
4
8
10
13
17
23
25
29
32
35
37
39
42
44
46
49
51
53
55
60
62
64
66
68
70
72
75
77
79
81
83
85
87
90
92
98
96
95
98
97
1
0
3
2
5
4
7
6
9
8
11
10
13
12
14
58
57
60
59
62
61
64
63
66
65
68
67
70
69
72
71
74
73
76
75
78
77
80
79
82
81
84
83
86
85
88
87
90
89
92
91
94
93
96
95
98
97
1
0
3
2
5
4
7
6...

result:

ok 347 step(s)

Test #73:

score: 0
Accepted
time: 2ms
memory: 3804kb

input:

110010001100011110001001001110110011100101100110110010010010110101101110001000000111101101101111011
111000111010001111111111100001111111111001011010000010011101100111011011011101011010110110010011100

output:

332
0
8
13
15
26
30
34
41
45
48
60
65
68
81
83
86
89
92
94
97
21
20
22
37
36
38
53
52
54
59
58
61
60
62
75
74
77
76
79
78
81
80
83
82
85
84
87
86
89
88
91
90
93
92
95
94
97
96
0
98
2
1
3
71
70
73
72
75
74
77
76
79
78
81
80
83
82
85
84
87
86
89
88
91
90
93
92
95
94
97
96
0
98
2
1
4
3
6
5
8
7
10
9
12
...

result:

ok 332 step(s)

Test #74:

score: 0
Accepted
time: 2ms
memory: 3700kb

input:

1011101110110111000001111100111011110111111010110100111011111110111111111111100111100111100010111111
0011101010000011101000111110110011001000000010110000011110100101001111001111111101101100001000010100

output:

412
2
6
10
13
21
23
28
32
34
37
39
41
46
52
56
58
60
64
66
68
70
72
74
79
81
85
87
94
96
98
9
8
11
10
13
12
14
5
4
7
6
9
8
11
10
13
12
15
14
17
16
19
18
21
20
23
22
24
45
44
47
46
48
1
0
3
2
28
29
26
27
24
25
22
23
20
21
18
19
16
17
14
15
12
13
10
11
8
9
6
7
52
53
50
51
48
49
46
47
44
45
42
43
40
41...

result:

ok 412 step(s)

Test #75:

score: 0
Accepted
time: 2ms
memory: 3720kb

input:

000111110010001011011110010110011001110101000110110000000010011001111000011111100101110011110101110
001001110110000101111101100101101100011011111101000110101000100101110001100011100011010110101100101

output:

460
3
5
16
19
21
27
31
35
45
48
61
65
67
73
75
77
83
88
90
95
8
7
9
15
14
17
16
19
18
21
20
23
22
24
42
41
44
43
46
45
48
47
50
49
52
51
54
53
56
55
57
98
97
1
0
3
2
5
4
7
6
9
8
11
10
13
12
15
14
17
16
19
18
21
20
23
22
25
24
27
26
29
28
31
30
33
32
35
34
36
94
93
96
95
98
97
1
0
3
2
5
4
7
6
9
8
11
...

result:

ok 460 step(s)

Test #76:

score: 0
Accepted
time: 2ms
memory: 3792kb

input:

111111001111111111101111111011011111111111111101111010100111111111011111111111111101111111110111111
000111100010001011001001101010010111111111010100111001100011011001110110110101101011111001111101110

output:

370
0
2
4
8
10
12
14
16
20
22
24
28
31
33
35
37
39
41
43
47
49
57
59
61
63
67
69
71
73
75
77
79
83
85
87
89
93
95
97
27
26
29
28
31
30
33
32
35
34
37
36
39
38
41
40
43
42
44
55
54
57
56
59
58
61
60
63
62
64
53
52
55
54
57
56
59
58
61
60
63
62
65
64
67
66
69
68
71
70
73
72
75
74
77
76
79
78
80
19
18
...

result:

ok 370 step(s)

Test #77:

score: 0
Accepted
time: 2ms
memory: 3664kb

input:

0010011110110001111011100101101011001111101111011111111001110010110111110010011000110010001101100
1010011010000101011001111100010001011001110110110011011111000011010111011001010001001010101110001

output:

418
5
7
10
15
17
20
27
32
36
38
42
44
47
49
51
53
57
64
67
69
77
82
90
93
23
22
24
41
40
43
42
45
44
47
46
49
48
51
50
53
52
55
54
57
56
58
63
62
65
64
67
66
69
68
70
87
86
89
88
91
90
93
92
95
94
0
96
1
75
74
77
76
79
78
81
80
83
82
85
84
87
86
89
88
91
90
93
92
95
94
0
96
2
1
4
3
6
5
8
7
10
9
12
1...

result:

ok 418 step(s)

Test #78:

score: 0
Accepted
time: 2ms
memory: 3660kb

input:

1010011001010110101100111011110100000110001001011111011001101101101100101011010001100100101011001101
1010011100010100110100111011101011000111000101001111100000111010110000000101011101101110100011110010

output:

191
5
13
18
22
26
28
37
47
49
53
57
60
63
66
74
81
92
96
99
3
2
5
4
7
6
8
12
11
14
13
15
25
24
27
26
29
28
30
43
42
44
52
51
54
53
56
55
58
57
60
59
62
61
64
63
66
65
68
67
69
73
72
75
74
76
86
85
87
91
90
93
92
95
94
97
96
87
85
86
83
84
81
82
79
80
77
78
75
76
85
83
84
81
82
79
80
72
70
71
68
69
6...

result:

ok 191 step(s)

Test #79:

score: 0
Accepted
time: 1ms
memory: 3772kb

input:

01110100110111001011010101010100101001111111100000011000011100110101010100101110100100011100111101
00000101111100101100010110101000010100010001100001011110001100100101110111111101010111101101011100

output:

315
1
8
11
18
37
39
41
43
51
57
62
76
87
92
94
14
13
15
30
29
31
28
27
30
29
32
31
33
72
71
73
70
69
72
71
74
73
76
75
77
68
67
70
69
72
71
74
73
76
75
78
77
79
90
89
66
65
68
67
70
69
72
71
74
73
76
75
78
77
60
59
62
61
64
63
66
65
68
67
70
69
72
71
74
73
76
75
26
25
28
27
30
29
32
31
34
33
36
35
3...

result:

ok 315 step(s)

Test #80:

score: 0
Accepted
time: 2ms
memory: 3792kb

input:

0010001011000111010110100111000101000101100101111010101010110100010010110011110011000010101010010
0110111010011000110111000000111001111000011000101100101110000001000010100100110001000010000100110

output:

421
8
13
19
25
39
45
47
58
70
74
76
80
7
6
9
8
11
10
13
12
14
3
2
5
4
7
6
9
8
11
10
13
12
15
14
16
23
22
25
24
26
44
43
46
45
48
47
49
38
37
40
39
42
41
44
43
46
45
48
47
50
49
51
34
33
36
35
38
37
40
39
42
41
44
43
46
45
48
47
50
49
52
51
53
32
31
34
33
36
35
38
37
40
39
42
41
44
43
46
45
48
47
50
...

result:

ok 421 step(s)

Test #81:

score: 0
Accepted
time: 2ms
memory: 3664kb

input:

0110110100001000100111010001111000101011000111011100000000101101000001001010101100101111100000101
0011100110010010111001100100110000010110110100001111000001111000110011111100011100111011101010001

output:

425
1
4
19
27
29
38
43
47
60
78
84
86
8
7
10
9
11
17
16
19
18
20
24
23
26
25
28
27
30
29
32
31
33
37
36
39
38
41
40
43
42
44
50
49
52
51
54
53
56
55
57
70
69
71
64
63
66
65
68
67
70
69
72
71
73
0
96
2
1
4
3
6
5
8
7
10
9
12
11
14
13
16
15
18
17
20
19
22
21
24
23
26
25
28
27
30
29
32
31
34
33
36
35
38...

result:

ok 425 step(s)

Test #82:

score: 0
Accepted
time: 2ms
memory: 3792kb

input:

1111011100111011111111011111111110011111110110101011111111101111101111101111101110110110110101111
1111111011001000100101001000001111110111000010001100001011111000010011011111010000000001011001000

output:

516
0
2
5
10
14
16
18
20
23
25
27
29
31
35
37
39
43
50
52
54
56
60
62
66
68
72
74
78
82
85
88
93
95
8
7
10
9
11
42
41
44
43
45
81
80
83
82
85
84
87
86
89
88
90
77
76
79
78
81
80
83
82
85
84
87
86
89
88
91
90
93
92
95
94
0
96
2
1
4
3
6
5
8
7
10
9
12
11
14
13
16
15
18
17
20
19
22
21
24
23
26
25
28
27
...

result:

ok 516 step(s)

Test #83:

score: 0
Accepted
time: 2ms
memory: 3796kb

input:

1111111110100111011111111111011011000111101111100011111010111111011111101011110111101111101111111111
0100111110111001111011100010000010010101010011101100101111100110010111101011100110000000001000111100

output:

174
0
2
4
6
13
17
19
21
23
25
29
32
37
39
42
44
50
52
58
60
62
65
67
69
74
76
79
81
84
86
90
92
94
96
98
11
10
13
12
14
9
8
11
10
13
12
15
14
17
16
19
18
21
20
23
22
25
24
26
89
88
73
72
75
74
57
56
59
58
61
60
63
62
65
64
67
66
69
68
71
70
52
53
64
62
63
60
61
58
59
40
38
39
36
37
34
35
32
33
30
31...

result:

ok 174 step(s)

Test #84:

score: 0
Accepted
time: 2ms
memory: 3868kb

input:

10100101010011010101011001100100011001101110100111100110111110110101100011110001110011101000010100
01100011110101001111101010110001110001110011101001100001011000010110010111000010110101010000101111

output:

331
12
21
25
33
37
40
47
49
53
56
58
62
67
72
74
79
84
3
2
4
1
0
3
2
5
4
6
30
29
32
31
34
33
36
35
38
37
40
39
41
20
19
22
21
24
23
26
25
28
27
30
29
32
31
34
33
36
35
38
37
40
39
42
41
43
18
17
20
19
22
21
24
23
26
25
28
27
30
29
32
31
34
33
36
35
38
37
40
39
42
41
44
43
46
45
48
47
50
49
52
51
54
...

result:

ok 331 step(s)

Test #85:

score: 0
Accepted
time: 2ms
memory: 3704kb

input:

11110011001011111011011011111111111110111011111111111010111101111111110111001111101001111111111111
11011010101110001100001101011111001010001010011010011001101111011011110001110000011101111010101101

output:

246
0
2
6
12
14
18
21
24
26
28
30
32
34
38
42
44
46
48
50
56
58
61
63
65
67
71
76
78
85
87
89
91
93
95
55
54
57
56
59
58
61
60
63
62
65
64
67
66
68
53
52
55
54
57
56
59
58
61
60
63
62
65
64
67
66
69
68
71
70
72
83
82
85
84
87
86
89
88
91
90
93
92
95
94
96
81
80
83
82
85
84
87
86
89
88
17
16
19
18
21...

result:

ok 246 step(s)

Test #86:

score: 0
Accepted
time: 0ms
memory: 3804kb

input:

00001100000101011001110101100110001100100110100010101110111000010001001101111011010011010100111011
10111010110000010101100110010011111000100001001011010100110101001100000011001111001101111100001011

output:

298
4
15
19
25
29
34
41
52
56
70
73
75
78
84
92
96
24
23
26
25
28
27
30
29
32
31
34
33
36
35
37
22
21
24
23
26
25
28
27
30
29
32
31
34
33
36
35
38
37
40
39
42
41
43
14
13
16
15
18
17
20
19
22
21
24
23
26
25
28
27
30
29
32
31
34
33
36
35
38
37
40
39
42
41
44
43
46
45
47
12
11
14
13
16
15
18
17
20
19
...

result:

ok 298 step(s)

Test #87:

score: 0
Accepted
time: 0ms
memory: 3788kb

input:

1111001001100000000110010000000100100000110100100111010111100011101111100100111000110101011011110010
1010001001010001011000110110011001101101100100011001110000100000110011000111100001101100011010110001

output:

239
0
2
9
19
40
49
55
57
62
66
68
76
82
89
92
94
7
6
9
8
11
10
13
12
15
14
17
16
19
18
21
20
22
32
31
33
44
43
45
54
53
56
55
58
57
60
59
62
61
63
52
51
54
53
56
55
58
57
60
59
62
61
64
63
66
65
68
67
69
74
73
76
75
77
88
87
90
89
92
91
94
93
96
95
97
83
84
81
82
79
80
77
78
75
76
73
74
71
72
69
70
...

result:

ok 239 step(s)

Test #88:

score: 0
Accepted
time: 0ms
memory: 3796kb

input:

1101011110101001001101001000101101000101011010100001111101110111011010000011110101000010010010000111
1001001100110010001101111011001100011101101001010101101001010110110010110001010011100111100001100111

output:

181
0
5
7
18
30
41
51
53
57
61
65
74
76
97
4
3
6
5
8
7
9
13
12
14
22
21
23
29
28
31
30
32
40
39
42
41
43
38
37
40
39
42
41
44
43
45
64
63
66
65
67
82
81
84
83
85
90
89
91
53
54
51
52
49
50
47
48
45
46
57
58
55
56
53
54
51
52
49
50
47
48
77
78
75
76
73
74
71
72
69
70
67
68
65
66
63
64
61
62
59
60
57
...

result:

ok 181 step(s)

Test #89:

score: 0
Accepted
time: 2ms
memory: 3780kb

input:

1111111101111111111111111111111111111111111111011111111111111011111111100111111111111101111011111010
1001010100111101111110011101011101000101001000011011101010100100111010001000101010001100001101011011

output:

408
0
2
4
6
9
11
13
15
17
19
21
23
25
27
29
31
33
35
37
39
41
43
47
49
51
53
55
57
59
62
64
66
68
73
75
77
79
81
83
87
89
92
94
46
45
48
47
50
49
52
51
54
53
56
55
58
57
60
59
62
61
64
63
66
65
68
67
69
86
85
88
87
90
89
92
91
94
93
95
96
97
94
95
92
93
90
91
88
89
86
87
84
85
82
83
80
81
78
79
92
9...

result:

ok 408 step(s)

Test #90:

score: 0
Accepted
time: 2ms
memory: 3796kb

input:

0111110101011111011111111100010110111111111100111111110101111110110111111111111111111110010111110110
1011110011110011010000110001011001011100011010000100100111000000010111011001011100010011011000011001

output:

282
1
3
11
13
17
19
21
23
31
34
36
38
40
42
46
48
50
52
57
59
61
64
67
69
71
73
75
77
79
81
83
85
91
93
97
56
55
58
57
60
59
62
61
64
63
66
65
68
67
70
69
72
71
74
73
30
29
32
31
34
33
36
35
38
37
40
39
42
41
44
43
46
45
48
47
50
49
52
51
54
53
56
55
58
57
60
59
62
61
64
63
66
65
68
67
26
25
28
27
3...

result:

ok 282 step(s)

Test #91:

score: 0
Accepted
time: 1ms
memory: 3824kb

input:

11111111111101101101111111111111111111111111111111011111011111100110110111111011011111001111111011
00110010000001010001011000011001110001110010011001011001101111000110010011011111101011001110011010

output:

264
0
2
4
6
8
10
13
16
19
21
23
25
27
29
31
33
35
37
39
41
43
45
47
51
53
57
59
61
65
68
71
73
75
78
81
83
88
90
92
96
86
85
88
87
90
89
92
91
93
47
48
45
46
43
44
41
42
39
40
37
38
35
36
33
34
31
32
29
30
27
28
25
26
23
24
21
22
19
20
17
18
15
16
53
54
51
52
49
50
47
48
45
46
43
44
41
42
39
40
37
3...

result:

ok 264 step(s)

Test #92:

score: 0
Accepted
time: 2ms
memory: 3848kb

input:

0011101101010111111011111101001111011010101101111111111111111111011110111111111111110101111110111111
0011000100011000011011001000110001011001010011001110110101010110100110101011100111011110100011010110

output:

243
2
6
13
15
17
20
22
24
30
32
35
42
45
47
49
51
53
55
57
59
61
65
67
70
72
74
76
78
80
82
87
89
91
94
96
98
5
4
7
6
8
28
27
30
29
32
31
34
33
36
35
37
12
11
14
13
16
15
18
17
20
19
22
21
24
23
26
25
28
27
30
29
32
31
34
33
36
35
38
37
39
86
85
88
87
90
89
92
91
94
93
61
62
59
60
57
58
55
56
53
54
...

result:

ok 243 step(s)

Test #93:

score: 0
Accepted
time: 2ms
memory: 3804kb

input:

0010011010100100110011111000111011010110001011110011000100000000010110000101100011111001000011101
0011100011101010110010010000010011110101101001011111001001100010000011001010110011010100000111100

output:

350
5
16
20
22
28
32
37
44
46
50
67
75
80
82
92
11
10
12
31
30
33
32
34
43
42
45
44
47
46
49
48
51
50
53
52
54
25
24
27
26
29
28
31
30
33
32
35
34
37
36
39
38
41
40
43
42
45
44
47
46
49
48
51
50
53
52
55
54
57
56
59
58
61
60
63
62
64
9
8
11
10
13
12
15
14
17
16
19
18
21
20
23
22
25
24
27
26
29
28
31...

result:

ok 350 step(s)

Test #94:

score: 0
Accepted
time: 0ms
memory: 3720kb

input:

1011010010000100110011001011001000001001100111100110011111101111110000110000111100010001000001111
1000100010010001111111011111011110111000000101100100000110000011111111011100110010001110110010011

output:

318
2
16
20
26
39
43
45
49
53
55
57
60
62
64
70
76
78
93
95
1
0
3
2
4
9
8
11
10
12
37
36
39
38
41
40
43
42
45
44
47
46
49
48
51
50
53
52
55
54
57
56
59
58
61
60
63
62
65
64
67
66
69
68
71
70
73
72
75
74
77
76
79
78
81
80
82
31
30
33
32
35
34
37
36
39
38
41
40
43
42
45
44
47
46
49
48
51
50
53
52
55
5...

result:

ok 318 step(s)

Test #95:

score: 0
Accepted
time: 2ms
memory: 3796kb

input:

01111111101101111111101011111111111111111111111011111001111111011111011111100111101101101110101111
10001110100101100110001011010001000010000000100010110011000011110100011100110010100011000000010000

output:

258
1
3
5
7
10
13
15
17
19
24
26
28
30
32
34
36
38
40
42
44
48
50
55
57
59
63
65
69
71
73
77
79
82
85
88
94
96
53
52
55
54
57
56
59
58
60
47
46
49
48
51
50
53
52
55
54
57
56
59
58
61
60
63
62
65
64
66
20
21
18
19
16
17
14
15
12
13
10
11
8
9
6
7
4
5
2
3
0
1
88
89
86
87
84
85
82
83
80
81
78
79
76
77
7...

result:

ok 258 step(s)

Test #96:

score: 0
Accepted
time: 1ms
memory: 3792kb

input:

11111010111111111100111101111011111101011110111111110111111111111111111110111111011011111101011111
01010111110010011000000110100111110100001100010000000000011111111010101010111101101100000100100001

output:

363
0
2
8
10
12
14
16
20
22
25
27
30
32
34
39
41
44
46
48
50
53
55
57
59
61
63
65
67
69
71
74
76
78
81
84
86
88
93
95
7
6
9
8
11
10
13
12
15
14
17
16
19
18
21
20
23
22
25
24
27
26
29
28
31
30
33
32
35
34
36
5
4
7
6
9
8
11
10
13
12
15
14
17
16
19
18
21
20
23
22
25
24
27
26
29
28
31
30
33
32
35
34
37
...

result:

ok 363 step(s)

Test #97:

score: 0
Accepted
time: 2ms
memory: 3860kb

input:

100011001111001100000000011111010111010001111111101101001011101010111101001000101100110100101101011
010101111001001101111000110001001101100000010010010011011000100101101110001011100010110011101010110

output:

565
4
8
10
14
25
27
33
41
43
45
47
50
58
66
68
80
84
92
97
1
0
3
2
5
4
7
6
9
8
11
10
13
12
15
14
17
16
19
18
21
20
23
22
25
24
27
26
28
54
53
55
38
37
40
39
42
41
44
43
46
45
48
47
50
49
52
51
54
53
56
55
58
57
59
36
35
38
37
40
39
42
41
44
43
46
45
48
47
50
49
52
51
54
53
56
55
58
57
60
59
61
32
31...

result:

ok 565 step(s)

Test #98:

score: 0
Accepted
time: 2ms
memory: 3660kb

input:

1011101111111111110111011011111101101011101111110011111010101111000100110101111011110111110011011
1111000101110011111110110000000111100011000000110110100011101100001110100101101111110000010010100

output:

379
2
6
8
10
12
14
16
19
23
26
28
30
33
38
42
44
46
50
52
60
62
70
75
77
80
82
85
87
92
95
5
4
7
6
9
8
11
10
13
12
15
14
17
16
19
18
20
59
58
61
60
63
62
65
64
66
57
56
59
58
61
60
63
62
65
64
67
66
69
68
71
70
72
55
54
57
56
59
58
61
60
63
62
65
64
67
66
69
68
71
70
73
72
75
74
77
76
79
78
81
80
83...

result:

ok 379 step(s)

Test #99:

score: 0
Accepted
time: 1ms
memory: 3848kb

input:

110111111110011010011000000100011000100100000000010101111101000101000100101110111111000100000110010
101100001000000000010110110000001110101001001111100000100100101010010111101000100101001100001010010

output:

535
0
3
5
7
9
13
19
31
53
55
74
78
80
82
93
17
16
19
18
21
20
23
22
25
24
26
37
36
38
70
69
71
66
65
68
67
70
69
72
71
74
73
75
98
97
1
0
3
2
5
4
7
6
9
8
11
10
13
12
15
14
17
16
19
18
21
20
23
22
25
24
27
26
29
28
31
30
33
32
35
34
37
36
39
38
41
40
43
42
45
44
47
46
48
88
87
90
89
92
91
94
93
96
95...

result:

ok 535 step(s)

Test #100:

score: 0
Accepted
time: 1ms
memory: 3808kb

input:

1111011111111111111110110101101010110101111111101101010111011101111111010111011011101111111111111
0100000010000100100011010011011011001101100100001101100000011000000010101110100010001000110111110

output:

555
0
2
5
7
9
11
13
15
17
19
22
27
34
39
41
43
45
48
55
59
63
65
67
73
77
80
84
86
88
90
92
94
26
25
28
27
29
33
32
35
34
36
76
75
78
77
80
79
81
72
71
74
73
76
75
78
77
80
79
82
81
84
83
86
85
88
87
90
89
92
91
94
93
95
70
69
72
71
74
73
76
75
78
77
80
79
82
81
84
83
86
85
88
87
90
89
92
91
94
93
9...

result:

ok 555 step(s)

Test #101:

score: 0
Accepted
time: 0ms
memory: 3772kb

input:

1011111101111111011111101111110111011111111011111011001101101011111011111011111111111110101111111111
0100000010111000011110000100000110110000111011111001111010000010110000001110100001011001001011100111

output:

203
2
4
6
9
11
13
17
19
21
24
26
28
31
35
37
39
41
44
46
50
54
57
62
64
68
70
74
76
78
80
82
84
90
92
94
96
98
1
0
3
2
5
4
7
6
9
8
11
10
13
12
14
34
33
36
35
38
37
40
39
42
41
44
43
46
45
47
89
88
58
59
56
57
54
55
52
53
50
51
48
49
46
47
44
45
42
43
64
65
62
63
60
61
58
59
56
57
54
55
52
53
50
51
4...

result:

ok 203 step(s)

Test #102:

score: 0
Accepted
time: 1ms
memory: 3824kb

input:

0100011010110011100011001101001000111111110000111100100111111010001101101001100011100110100001000
1110011100111111011010101010111000000010111111101110100000011110101111101010011011100010110100100

output:

581
5
10
14
20
24
34
36
38
40
46
48
55
57
59
66
69
75
80
85
2
1
4
3
6
5
7
17
16
19
18
21
20
23
22
25
24
26
89
88
91
90
92
83
82
85
84
87
86
89
88
91
90
93
92
95
94
0
96
2
1
4
3
6
5
8
7
10
9
12
11
14
13
16
15
18
17
20
19
22
21
24
23
26
25
28
27
29
73
72
75
74
77
76
79
78
81
80
83
82
85
84
87
86
89
88...

result:

ok 581 step(s)

Test #103:

score: 0
Accepted
time: 2ms
memory: 3792kb

input:

11111011111111111110000111011111100101110101111111111100111111111111110110111011111111110111111010
10110010110100100101110001111111110100111111100000111010001011001100011011101011010100110100010001

output:

337
0
2
6
8
10
12
14
16
23
27
29
31
37
43
45
47
49
51
56
58
60
62
64
66
68
71
74
78
80
82
84
86
89
91
93
19
18
21
20
23
22
24
5
4
7
6
9
8
11
10
13
12
15
14
17
16
19
18
21
20
23
22
25
24
27
26
29
28
31
30
33
32
34
54
53
56
55
58
57
60
59
62
61
64
63
66
65
68
67
70
69
72
71
74
73
75
42
41
44
43
46
45
...

result:

ok 337 step(s)

Test #104:

score: 0
Accepted
time: 2ms
memory: 3664kb

input:

111111111011111111110111110111101111111111101111111011111101110110111110111010101101101001111110111
010100101111111010110010001100111011000000001110111101001100000111001110100111011100000010110111111

output:

456
0
2
4
6
10
12
14
16
18
21
23
27
29
32
34
36
38
40
44
46
48
52
54
56
59
63
66
68
72
80
83
89
91
93
96
9
8
11
10
13
12
15
14
17
16
19
18
21
20
23
22
24
51
50
53
52
55
54
57
56
59
58
60
0
98
2
1
4
3
6
5
8
7
10
9
12
11
14
13
16
15
18
17
20
19
22
21
24
23
26
25
28
27
30
29
32
31
34
33
36
35
38
37
40
...

result:

ok 456 step(s)

Test #105:

score: 0
Accepted
time: 0ms
memory: 3668kb

input:

11101001110111101111111111111111111110100111111111110111111111111001111011111111111111111001101011
00101100011010100110000100001111101100000100101011001011001001010101010110001010101001010010010010

output:

260
0
7
11
13
16
18
20
22
24
26
28
30
32
34
41
43
45
47
49
53
55
57
59
61
63
67
69
72
74
76
78
80
82
84
86
91
96
5
4
7
6
8
39
38
41
40
43
42
45
44
47
46
49
48
50
95
94
37
36
39
38
41
40
43
42
45
44
47
46
49
48
51
50
53
52
55
54
57
56
59
58
61
60
63
62
65
64
67
66
69
68
71
70
73
72
75
74
86
87
84
85
...

result:

ok 260 step(s)

Test #106:

score: 0
Accepted
time: 1ms
memory: 3780kb

input:

010110100001110000011001111101010001100110000110100000110010010011110111011001100100110101001111011
111100101100000110111011100001011011001100000001110110101000001001000101100111110100010111111111111

output:

394
3
11
19
23
25
35
39
45
54
64
66
69
73
77
84
92
94
97
2
1
4
3
5
32
31
34
33
36
35
38
37
40
39
42
41
44
43
46
45
47
30
29
32
31
34
33
36
35
38
37
40
39
42
41
44
43
46
45
48
47
50
49
52
51
54
53
56
55
57
90
89
92
91
94
93
96
95
98
97
1
0
3
2
5
4
7
6
9
8
11
10
12
88
87
90
89
92
91
94
93
96
95
98
97
...

result:

ok 394 step(s)

Test #107:

score: 0
Accepted
time: 1ms
memory: 3724kb

input:

0011110101010111100110111111101110010000100101101101000001101011001110001000011001111110111011010111
0111110011101111100110110001101111000001011100010011101001011010000101110001000000001110100110111100

output:

297
2
4
13
15
19
22
24
26
30
45
48
57
62
66
77
81
83
85
88
92
97
12
11
14
13
16
15
18
17
20
19
22
21
24
23
26
25
27
10
9
12
11
14
13
16
15
18
17
20
19
22
21
24
23
26
25
28
27
30
29
31
36
35
38
37
39
52
51
54
53
56
55
58
57
59
44
43
46
45
48
47
50
49
52
51
54
53
56
55
58
57
60
59
62
61
64
63
66
65
67...

result:

ok 297 step(s)

Test #108:

score: 0
Accepted
time: 2ms
memory: 3792kb

input:

1101111110111111111111001010110111111011111111101101110111110110111111111111111111110110111110110
0001001010101101111100101001000110001111111111011010001101111110011010100011010010010100010110110

output:

288
0
3
5
7
10
12
14
16
18
20
28
31
33
35
38
40
42
44
48
51
55
57
61
64
66
68
70
72
74
76
78
80
82
85
88
90
94
47
46
49
48
51
50
52
27
26
29
28
31
30
33
32
35
34
37
36
39
38
41
40
43
42
45
44
47
46
49
48
51
50
53
52
55
54
57
56
58
93
92
95
94
0
96
2
1
4
3
6
5
8
7
10
9
12
11
14
13
16
15
18
17
20
19
2...

result:

ok 288 step(s)

Test #109:

score: 0
Accepted
time: 2ms
memory: 3792kb

input:

1111101010111100111110111111110110011111101101111010111111011101111111110111111111111111110111111
0011010101010001111010111000100001010010010111000010010000100100111100011011011100101010011101000

output:

462
0
2
10
12
16
18
22
24
26
28
31
35
37
39
42
45
47
52
54
56
59
63
65
67
69
73
75
77
79
81
83
85
87
91
93
95
51
50
53
52
55
54
57
56
59
58
60
21
20
23
22
25
24
27
26
29
28
31
30
33
32
35
34
37
36
39
38
41
40
43
42
45
44
47
46
49
48
51
50
53
52
55
54
57
56
59
58
61
60
63
62
65
64
67
66
69
68
70
9
8
...

result:

ok 462 step(s)

Test #110:

score: 0
Accepted
time: 2ms
memory: 3704kb

input:

1110101011111010110111111111011011111100111101111110111011101111111111111111111111111111111110011
1111001100010000011101010000110000001011110101111010110001001101100101011100000101111101010100111

output:

590
0
8
10
16
19
21
23
25
29
32
34
36
40
42
45
47
49
52
56
60
62
64
66
68
70
72
74
76
78
80
82
84
86
88
90
95
15
14
17
16
19
18
21
20
23
22
25
24
26
93
92
95
94
0
96
1
59
58
61
60
63
62
65
64
67
66
69
68
71
70
73
72
75
74
77
76
79
78
81
80
83
82
85
84
87
86
89
88
91
90
93
92
95
94
0
96
2
1
3
55
54
5...

result:

ok 590 step(s)

Test #111:

score: 0
Accepted
time: 2ms
memory: 3796kb

input:

01111001111100001000111000101111100001110101011011110110111111010001100101000100011110111111100100
01110101100100101100111000110100011000010001101100011110011001101111111001000101010111101011001011

output:

296
1
3
7
9
20
28
30
37
45
48
50
53
56
58
60
67
81
83
86
88
90
12
11
14
13
15
33
32
35
34
37
36
38
27
26
29
28
31
30
33
32
35
34
37
36
39
38
40
23
22
25
24
27
26
29
28
31
30
33
32
35
34
37
36
39
38
41
40
42
78
77
80
79
82
81
84
83
86
85
88
87
90
89
91
61
62
59
60
57
58
55
56
53
54
51
52
49
50
47
48
...

result:

ok 296 step(s)

Test #112:

score: 0
Accepted
time: 2ms
memory: 3704kb

input:

0111111100101101110111110111111101111111101111111111111111001101111101111101011111111111111111010
0010111011001111001111110001100101010100000100100110101000110011101001010110110001010011001001011

output:

438
1
3
5
12
15
19
21
25
27
29
33
35
37
39
42
44
46
48
50
52
54
56
60
63
65
69
71
77
79
81
83
85
87
89
91
8
7
9
96
95
1
0
3
2
5
4
7
6
9
8
11
10
13
12
15
14
16
94
93
96
95
1
0
3
2
5
4
7
6
9
8
11
10
13
12
15
14
17
16
19
18
21
20
22
76
75
78
77
80
79
82
81
84
83
86
85
88
87
90
89
92
91
94
93
96
95
1
0
...

result:

ok 438 step(s)

Test #113:

score: 0
Accepted
time: 2ms
memory: 3860kb

input:

11011111110001110110110001011010000110101110101101100101100011100101111110110100110100110111100111
10010000011101011001001100100110001101101001011101111001001001011011101111000011100000000000110111

output:

390
0
3
5
7
13
17
20
27
35
40
46
49
55
60
67
69
71
74
80
86
89
91
95
26
25
28
27
29
16
15
18
17
20
19
22
21
24
23
26
25
28
27
30
29
32
31
34
33
36
35
37
10
9
12
11
14
13
16
15
18
17
20
19
22
21
24
23
26
25
28
27
30
29
32
31
34
33
36
35
38
37
40
39
41
45
44
47
46
49
48
51
50
52
63
62
64
75
76
73
74
7...

result:

ok 390 step(s)

Test #114:

score: 0
Accepted
time: 2ms
memory: 3796kb

input:

0111101111101011111111111110111111011011111111111011111111011111111011111011011011001110100111111
1111000001001101101101111011110011011111011011000010110010011100000001011101000000101011100011000

output:

353
1
3
6
8
14
16
18
20
22
24
28
30
32
35
38
40
42
44
46
50
52
54
56
59
61
63
65
68
70
74
77
80
84
91
93
95
89
88
91
90
93
92
95
94
0
96
2
1
4
3
6
5
8
7
9
87
86
89
88
91
90
93
92
95
94
0
96
2
1
4
3
6
5
8
7
10
9
11
73
72
75
74
77
76
79
78
81
80
83
82
85
84
87
86
89
88
91
90
93
92
95
94
0
96
2
1
4
3
6...

result:

ok 353 step(s)

Test #115:

score: 0
Accepted
time: 2ms
memory: 3792kb

input:

0101110111100010110010100110110000100100010111000001010011000010111110000111110101110010100111010001
0100001101011111110110100010001100011111001001010000110111000101011110010000000011000110001101101010

output:

401
3
7
9
16
25
28
43
56
64
66
73
75
81
91
6
5
8
7
10
9
12
11
13
2
1
4
3
6
5
8
7
10
9
12
11
14
13
16
15
18
17
19
35
34
36
23
22
25
24
27
26
29
28
31
30
33
32
35
34
37
36
39
38
40
54
53
56
55
58
57
60
59
61
52
51
54
53
56
55
58
57
60
59
62
61
64
63
66
65
67
84
83
85
80
79
82
81
84
83
86
85
87
43
44
4...

result:

ok 401 step(s)

Test #116:

score: 0
Accepted
time: 2ms
memory: 3724kb

input:

1100010111011111011101111110111011101111111111111111111111111011111111111111111111111111111111111011
0011000011010101100011100100001101111000000110101110110000111001010100010011111110001010100001001100

output:

351
0
7
11
13
17
21
23
25
28
32
36
38
40
42
44
46
48
50
52
54
56
58
62
64
66
68
70
72
74
76
78
80
82
84
86
88
90
92
94
98
20
19
22
21
24
23
26
25
28
27
29
16
15
18
17
20
19
22
21
24
23
26
25
28
27
30
29
32
31
33
10
9
12
11
14
13
16
15
18
17
20
19
22
21
24
23
26
25
28
27
30
29
32
31
34
33
36
35
38
37...

result:

ok 351 step(s)

Test #117:

score: 0
Accepted
time: 2ms
memory: 3848kb

input:

10001100011010101011011110101110110011000111011001001000000001110101110111100011010101000010110011
00111111110100101000010010100101000100111110110100101101111111011001001011101110000101001111011010

output:

402
4
9
18
21
23
28
32
36
41
45
61
67
71
73
78
92
96
31
30
33
32
35
34
37
36
39
38
41
40
42
27
26
29
28
31
30
33
32
35
34
37
36
39
38
41
40
43
42
45
44
47
46
48
53
52
55
54
57
56
59
58
61
60
62
17
16
19
18
21
20
23
22
25
24
27
26
29
28
31
30
33
32
35
34
37
36
39
38
41
40
43
42
45
44
47
46
49
48
51
5...

result:

ok 402 step(s)

Test #118:

score: 0
Accepted
time: 2ms
memory: 3848kb

input:

1000010111110101110100001101100001011101111001100001001100111111101001111010100001111110010001000100
0011000011111111001101101110101001010100111001111111101011010001011111111001011101010000010011110001

output:

437
7
9
15
24
27
35
39
41
45
54
58
60
62
69
71
81
83
85
1
0
3
2
4
52
51
54
53
56
55
58
57
60
59
62
61
63
38
37
40
39
42
41
44
43
46
45
48
47
50
49
52
51
54
53
56
55
58
57
60
59
62
61
64
63
65
34
33
36
35
38
37
40
39
42
41
44
43
46
45
48
47
50
49
52
51
54
53
56
55
58
57
60
59
62
61
64
63
66
65
68
67
...

result:

ok 437 step(s)

Test #119:

score: 0
Accepted
time: 2ms
memory: 3792kb

input:

1011010010010111100001011111011110111010110011101111111110111101111001101001100110010100001100110
0001101011001001101101010011101110110100000000010010011111101100110011111001110111111100100011011

output:

249
2
13
15
23
25
29
31
34
40
44
48
50
52
54
58
60
63
65
69
75
79
90
94
1
0
3
2
4
9
8
10
28
27
30
29
32
31
34
33
35
22
21
24
23
26
25
28
27
30
29
32
31
34
33
36
35
37
73
72
75
74
77
76
79
78
81
80
82
57
56
59
58
61
60
63
62
65
64
67
66
69
68
71
70
73
72
75
74
77
76
79
78
81
80
83
82
84
47
46
49
48
5...

result:

ok 249 step(s)

Test #120:

score: 0
Accepted
time: 2ms
memory: 3796kb

input:

0110111111011111111111111111111111111111111110111100111011101101111101101101111011101111001101111
1101000000010000111010011011110010010100110101011111010010001110001100001011100011111000001001110

output:

283
1
4
6
8
11
13
15
17
19
21
23
25
27
29
31
33
35
37
39
41
43
46
48
52
56
60
63
65
69
72
75
77
80
84
86
90
93
95
59
58
61
60
63
62
65
64
66
83
82
85
84
87
86
89
88
91
90
93
92
95
94
0
96
2
1
4
3
6
5
8
7
10
9
12
11
14
13
16
15
18
17
20
19
22
21
24
23
26
25
28
27
30
29
32
31
34
33
36
35
38
37
40
39
4...

result:

ok 283 step(s)

Test #121:

score: 0
Accepted
time: 2ms
memory: 3868kb

input:

0001100100010110100001010011111110100110101001010000011101000111110101111001111110100100101010010110
1001001101101110110100010000010011000011100111111100101101100010111110100101010001010001011000111000

output:

319
3
13
26
28
30
37
53
61
63
69
71
75
77
79
97
12
11
14
13
15
24
23
26
25
28
27
30
29
31
22
21
24
23
26
25
28
27
30
29
32
31
33
8
7
10
9
12
11
14
13
16
15
18
17
20
19
22
21
24
23
26
25
28
27
30
29
32
31
34
33
36
35
38
37
39
43
42
44
68
67
70
69
72
71
74
73
76
75
78
77
80
79
81
86
85
87
66
65
68
67
...

result:

ok 319 step(s)

Test #122:

score: 0
Accepted
time: 2ms
memory: 3780kb

input:

1000110000110010000100010111011001010101100000100001111101100110101001000111011001011010000110011
0100111010010100011001100100011110010100010110100111000101011010101011000100000001101001011111110

output:

417
4
10
25
29
39
51
53
57
61
73
77
83
91
95
15
14
17
16
18
1
0
3
2
5
4
7
6
9
8
11
10
13
12
15
14
17
16
19
18
21
20
22
38
37
40
39
42
41
44
43
45
56
55
58
57
60
59
62
61
63
36
35
38
37
40
39
42
41
44
43
46
45
48
47
50
49
52
51
54
53
56
55
58
57
60
59
62
61
64
63
65
82
81
84
83
85
76
75
78
77
80
79
8...

result:

ok 417 step(s)

Test #123:

score: 0
Accepted
time: 1ms
memory: 3860kb

input:

1111011111110111001110011101111111111011111111111111011101100101101101111111111001111010111011110
1111101001110111110111110110011100100010011010100110111100101011111101100110111100011110001010110

output:

438
0
2
5
7
9
13
18
23
27
29
31
33
35
38
40
42
44
46
48
50
53
57
63
66
69
71
73
75
77
81
83
88
92
94
16
15
18
17
19
62
61
64
63
66
65
68
67
70
69
72
71
74
73
76
75
78
77
80
79
82
81
84
83
85
56
55
58
57
60
59
62
61
64
63
66
65
68
67
70
69
72
71
74
73
76
75
78
77
80
79
82
81
84
83
86
85
88
87
89
26
2...

result:

ok 438 step(s)

Test #124:

score: 0
Accepted
time: 2ms
memory: 3664kb

input:

0001111001010011111011100001001100011110011000000000011000000001111010110011010011000001110011001
0100011100001000101111010101101011001000110111001101010010101000010001010010010011101001001111001

output:

203
3
5
14
16
20
30
35
37
41
53
63
65
70
74
80
87
92
12
11
14
13
16
15
17
10
9
12
11
14
13
16
15
18
17
20
19
21
28
27
30
29
32
31
34
33
36
35
38
37
40
39
42
41
44
43
46
45
48
47
50
49
52
51
54
53
56
55
58
57
60
59
62
61
64
63
66
65
67
90
89
92
91
94
93
95
75
76
73
74
71
72
69
70
67
68
65
66
95
93
94...

result:

ok 203 step(s)

Test #125:

score: 0
Accepted
time: 2ms
memory: 3792kb

input:

0111011110111111001111110110111111111011111101111111101111111111111101011011111010111111111111101
0110111010000010011111000111000000101011010000100100100011010101101100001101010101011101101010010

output:

486
1
5
7
10
12
14
18
20
22
25
28
30
32
34
38
40
42
45
47
49
51
54
56
58
60
62
64
66
71
74
76
82
84
86
88
90
92
4
3
6
5
8
7
10
9
12
11
14
13
16
15
18
17
20
19
22
21
24
23
26
25
28
27
30
29
32
31
34
33
35
70
69
72
71
74
73
76
75
77
0
96
2
1
4
3
6
5
8
7
10
9
12
11
14
13
16
15
18
17
20
19
22
21
24
23
2...

result:

ok 486 step(s)

Test #126:

score: 0
Accepted
time: 2ms
memory: 3828kb

input:

011110010000110111000101111111001011011000001011010000100011101110111011010010101110100101001000111
011110011110000000110000000001001000101101011000001010001011110101100100111001000110010000001110010

output:

410
1
3
12
15
23
25
27
34
37
46
58
62
66
70
80
96
30
29
31
22
21
24
23
26
25
28
27
30
29
32
31
34
33
36
35
38
37
40
39
42
41
43
50
49
52
51
53
18
17
20
19
22
21
24
23
26
25
28
27
30
29
32
31
34
33
36
35
38
37
40
39
42
41
44
43
46
45
48
47
50
49
52
51
54
53
56
55
58
57
59
8
7
10
9
12
11
14
13
16
15
1...

result:

ok 410 step(s)

Test #127:

score: 0
Accepted
time: 1ms
memory: 3788kb

input:

10111111111111111101111011101011001111111111011111101101111111101111011111111111110100101111011111
00010010100010110111111000111010010101011000000010101000000000010111000100001010100101000000100101

output:

356
2
4
6
8
10
12
14
16
19
21
24
30
34
36
38
40
42
45
47
49
52
55
57
59
61
64
66
69
71
73
75
77
79
88
90
93
95
97
29
28
31
30
33
32
35
34
37
36
39
38
41
40
43
42
45
44
47
46
49
48
51
50
53
52
55
54
57
56
59
58
61
60
63
62
65
64
67
66
69
68
71
70
73
72
75
74
77
76
79
78
80
27
26
29
28
31
30
33
32
35
...

result:

ok 356 step(s)

Test #128:

score: 0
Accepted
time: 2ms
memory: 3664kb

input:

000110101110000000101011110111100101111111111100000000110011101001101100010010100111001000000010111
110010000101010011000100010010010100101000001000100010111011000011111101111010010110110100110011111

output:

355
3
8
22
24
27
29
35
37
39
41
43
54
58
65
68
81
96
21
20
23
22
25
24
27
26
29
28
31
30
32
19
18
21
20
23
22
25
24
27
26
29
28
31
30
33
32
35
34
37
36
39
38
41
40
43
42
44
63
62
65
64
67
66
69
68
71
70
72
79
78
81
80
82
0
98
2
1
4
3
5
95
94
97
96
0
98
2
1
4
3
6
5
8
7
9
87
86
89
88
91
90
93
92
95
94...

result:

ok 355 step(s)

Test #129:

score: 0
Accepted
time: 2ms
memory: 3804kb

input:

11110110110110100011011101110111101111101111111011111011111000111110111111111111011011110111111111
00111101001111100111110101001000010011101000110011000100101011100000010110011110101110101000000111

output:

282
0
2
5
8
11
18
21
25
29
31
34
36
40
42
44
48
50
54
56
62
64
68
70
72
74
76
78
81
84
86
89
91
93
95
15
14
17
16
19
18
21
20
22
28
27
30
29
32
31
34
33
36
35
37
67
66
69
68
71
70
73
72
75
74
77
76
79
78
81
80
83
82
85
84
87
86
89
88
91
90
93
92
95
94
96
59
58
61
60
63
62
65
64
67
66
69
68
71
70
73
...

result:

ok 282 step(s)

Test #130:

score: 0
Accepted
time: 2ms
memory: 3796kb

input:

1110111111011101011111111100111111111111111101111111111101101001111111110111111111111111101011101
0110001100011010001100101001000111000001000011111111101010010011100110001110001001010100110000011

output:

405
0
4
6
8
11
17
19
21
23
28
30
32
34
36
38
40
42
45
47
49
51
53
57
63
65
67
69
73
75
77
79
81
83
85
87
92
3
2
5
4
7
6
9
8
11
10
12
56
55
58
57
59
72
71
74
73
76
75
78
77
80
79
82
81
84
83
86
85
88
87
89
26
25
28
27
30
29
32
31
34
33
36
35
38
37
40
39
42
41
44
43
46
45
48
47
50
49
52
51
54
53
56
55...

result:

ok 405 step(s)

Test #131:

score: 0
Accepted
time: 2ms
memory: 3732kb

input:

000110000001100100011110101011001010010001011101101100101000111000010000011111111100010010100011110
000010111010011101001011101100010111000111000110011001101010100001110011010101001000001111011001001

output:

347
3
11
19
21
28
43
47
50
60
73
75
77
79
94
96
16
15
18
17
20
19
22
21
23
35
34
36
33
32
35
34
37
36
39
38
40
27
26
29
28
31
30
33
32
35
34
37
36
39
38
41
40
43
42
44
63
62
65
64
66
57
56
59
58
61
60
63
62
65
64
67
66
69
68
71
70
73
72
75
74
77
76
79
78
80
55
54
57
56
59
58
61
60
63
62
65
64
67
66
...

result:

ok 347 step(s)

Test #132:

score: 0
Accepted
time: 2ms
memory: 3796kb

input:

00100100001001011111111001011100000100101101000011101000011101011111110111100101111110101100110010
01010110010011000110001011101010111110111101010010010110001000110100010011011011101001011101110100

output:

349
15
17
19
21
27
40
48
57
63
65
67
71
73
79
81
83
88
92
3
2
4
11
10
12
36
35
37
44
43
46
45
48
47
49
30
29
32
31
34
33
36
35
38
37
40
39
42
41
44
43
46
45
48
47
50
49
51
78
77
80
79
82
81
84
83
85
70
69
72
71
74
73
76
75
78
77
80
79
82
81
84
83
86
85
88
87
90
89
92
91
94
93
95
62
61
64
63
66
65
68...

result:

ok 349 step(s)

Test #133:

score: 0
Accepted
time: 1ms
memory: 3792kb

input:

011001111110111011011101011010000010110101110100001111101110111111000001111011100111011000011101101
001001100100111100101101010101101000010100110101011100110011110100100111110110000100100111110001111

output:

394
1
5
7
9
12
16
19
25
36
41
50
52
56
60
62
64
71
73
76
81
85
91
95
15
14
17
16
19
18
20
24
23
26
25
27
35
34
37
36
38
46
45
48
47
50
49
52
51
53
44
43
46
45
48
47
50
49
52
51
54
53
56
55
57
79
78
81
80
82
94
93
96
95
97
44
42
43
40
41
38
39
36
37
34
35
32
33
30
31
28
29
26
27
24
25
22
23
20
21
18
...

result:

ok 394 step(s)

Test #134:

score: 0
Accepted
time: 0ms
memory: 3804kb

input:

0000010110110011011011010100101011101101000001001010011001001111111101010011100000110110100111110000
0001010000010011101011001111000000000011010101111101101110101100101111110100000001011000001001011010

output:

262
7
10
14
17
20
32
36
53
60
62
64
66
74
82
85
91
93
26
25
27
24
23
26
25
28
27
29
6
5
8
7
10
9
12
11
14
13
16
15
18
17
20
19
22
21
24
23
26
25
28
27
30
29
32
31
33
46
45
47
40
39
42
41
44
43
46
45
48
47
49
72
71
74
73
75
70
69
72
71
74
73
76
75
78
77
80
79
82
81
84
83
86
85
87
55
56
53
54
51
52
49...

result:

ok 262 step(s)

Test #135:

score: 0
Accepted
time: 2ms
memory: 3700kb

input:

1011010011100010100010100001011111011001010111100110111110110111110101000101111111000110111110100
1011101101010001010110111001101010100111100000010110000010010101100011110001100011100001111101101

output:

314
2
8
29
31
35
43
45
49
52
54
58
61
63
75
77
79
85
88
90
1
0
3
2
4
23
22
25
24
26
21
20
23
22
25
24
27
26
29
28
31
30
32
17
16
19
18
21
20
23
22
25
24
27
26
29
28
31
30
33
32
35
34
37
36
38
15
14
17
16
19
18
21
20
23
22
25
24
27
26
29
28
31
30
33
32
35
34
37
36
39
38
40
57
56
59
58
61
60
63
62
64
...

result:

ok 314 step(s)

Test #136:

score: 0
Accepted
time: 0ms
memory: 3776kb

input:

1111111111110110111111111110111111011110111101111010111111111011111111111101111101011111111111111111
1111101101001000010111010010100001001110110001110011111010111011110101001101001101001000001011000011

output:

250
0
2
4
6
8
10
13
16
18
20
22
24
28
30
32
35
37
40
42
45
47
52
54
56
58
62
64
66
68
70
72
75
77
83
85
87
89
91
93
95
97
61
60
63
62
65
64
67
66
69
68
71
70
73
72
75
74
77
76
78
51
50
53
52
55
54
57
56
59
58
61
60
63
62
65
64
67
66
69
68
71
70
73
72
75
74
77
76
79
78
80
27
26
29
28
31
30
33
32
35
3...

result:

ok 250 step(s)

Test #137:

score: 0
Accepted
time: 2ms
memory: 3864kb

input:

1010001110101011110110111100011100110010111100100111110000101010000010001011011011111100110001101
0111100001001101000101010001111001001001110001010011010110101101010110111111101001110000001010011

output:

616
6
14
16
19
22
24
29
34
40
42
49
51
74
77
80
82
84
88
93
96
13
12
15
14
17
16
19
18
21
20
23
22
25
24
27
26
29
28
30
47
46
49
48
51
50
52
73
72
75
74
77
76
79
78
81
80
83
82
85
84
87
86
89
88
91
90
93
92
95
94
0
96
1
69
68
71
70
73
72
75
74
77
76
79
78
81
80
83
82
85
84
87
86
89
88
91
90
93
92
95...

result:

ok 616 step(s)

Test #138:

score: 0
Accepted
time: 1ms
memory: 3792kb

input:

000100101010110011101001111000110111000111100100100100001110000101111011011100111010110010101011000
100111010110111110001101001001010110110001100110100111001101010110100101111101101110110011001111011

output:

550
12
16
23
25
30
33
39
41
56
65
67
70
73
78
84
94
4
3
5
21
20
23
22
25
24
27
26
29
28
31
30
33
32
34
19
18
21
20
23
22
25
24
27
26
29
28
31
30
33
32
35
34
37
36
39
38
41
40
43
42
44
49
48
50
59
58
61
60
62
11
10
13
12
15
14
17
16
19
18
21
20
23
22
25
24
27
26
29
28
31
30
33
32
35
34
37
36
39
38
41...

result:

ok 550 step(s)

Test #139:

score: 0
Accepted
time: 2ms
memory: 3848kb

input:

010011100001000100010100011100011010001111110000010100111101111100101101011110100101100000111011011
111011111100001101000000000110100111000000110011001100110001100011000100101001110011100101100100001

output:

323
4
25
31
38
40
42
54
56
59
61
68
73
75
83
90
94
97
2
1
4
3
5
28
27
30
29
32
31
33
64
63
65
72
71
74
73
76
75
77
82
81
84
83
86
85
88
87
90
89
91
52
51
54
53
56
55
58
57
60
59
62
61
64
63
66
65
68
67
70
69
72
71
74
73
76
75
78
77
80
79
82
81
84
83
86
85
88
87
90
89
92
91
94
93
96
95
98
97
1
0
3
2
...

result:

ok 323 step(s)

Test #140:

score: 0
Accepted
time: 0ms
memory: 3824kb

input:

101000110100011110010010100101111100110010000110001011001001101101110100111000000100101000000011101
010101100110010001010011110011100101011001011001100000110111001001100111100101010100111111111100011

output:

448
6
13
15
29
31
36
45
52
59
62
65
72
94
98
3
2
5
4
7
6
8
20
19
21
25
24
26
34
33
36
35
38
37
39
57
56
59
58
61
60
63
62
65
64
66
51
50
53
52
55
54
57
56
59
58
61
60
63
62
65
64
67
66
68
75
74
77
76
79
78
80
97
96
0
98
2
1
4
3
6
5
8
7
10
9
12
11
14
13
16
15
18
17
20
19
22
21
24
23
26
25
28
27
30
29...

result:

ok 448 step(s)

Test #141:

score: 0
Accepted
time: 2ms
memory: 3732kb

input:

0100101111111111111110100111111111011110101100000011110100010111011011111111111111011011111110101110
0101101100101001000111111101010000100011111010000010000100110010100100111110110111000110111001100110

output:

249
6
8
10
12
14
16
18
25
27
29
31
35
37
42
50
52
61
65
68
70
72
74
76
78
80
83
86
88
90
96
2
1
3
23
22
25
24
27
26
29
28
31
30
32
41
40
43
42
45
44
47
46
49
48
51
50
53
52
54
21
20
23
22
25
24
27
26
29
28
31
30
33
32
35
34
37
36
39
38
41
40
43
42
45
44
47
46
49
48
51
50
53
52
55
54
57
56
58
64
63
6...

result:

ok 249 step(s)

Test #142:

score: 0
Accepted
time: 2ms
memory: 3660kb

input:

111011111011110111101101111111110111111011110011011111101011111111111111111111011001111110101111101
101000000101110000111110111001001010110111011000110000010111100010011101110110010100001101011011000

output:

426
0
4
6
10
12
15
17
20
23
25
27
29
33
35
37
40
42
46
49
51
53
58
60
62
64
66
68
70
72
74
76
79
83
85
87
92
94
9
8
11
10
13
12
15
14
17
16
19
18
21
20
23
22
25
24
27
26
29
28
30
0
98
1
97
96
0
98
2
1
4
3
6
5
8
7
10
9
12
11
14
13
16
15
18
17
20
19
22
21
24
23
26
25
28
27
30
29
32
31
34
33
36
35
38
3...

result:

ok 426 step(s)

Test #143:

score: 0
Accepted
time: 2ms
memory: 3732kb

input:

1111110011111110111011111011111110100111111111011111110011110111111111111101111111111101111110111111
0100111110110010100101111001000101101110100111111001011010000111000001111010000110011011111110110100

output:

319
0
2
4
8
10
12
16
20
22
26
28
30
37
39
41
43
47
49
51
56
58
61
63
65
67
69
71
75
77
79
81
83
87
89
91
94
96
98
35
34
37
36
39
38
41
40
43
42
44
33
32
35
34
37
36
39
38
41
40
43
42
45
44
47
46
49
48
51
50
52
25
24
27
26
29
28
31
30
33
32
35
34
37
36
39
38
41
40
43
42
45
44
47
46
49
48
51
50
53
52
...

result:

ok 319 step(s)

Test #144:

score: 0
Accepted
time: 2ms
memory: 3776kb

input:

00001110111110000001010011110101110101001011110010100000100000000101100111101101000110010001000111
11110000101111010101111100000100100001110000000010011100000110011111100001100101100000110100111100

output:

292
4
8
10
24
26
31
42
44
67
71
73
76
83
95
13
12
15
14
17
16
18
7
6
9
8
11
10
13
12
15
14
17
16
19
18
20
38
37
39
36
35
38
37
40
39
42
41
44
43
46
45
47
34
33
36
35
38
37
40
39
42
41
44
43
46
45
48
47
49
30
29
32
31
34
33
36
35
38
37
40
39
42
41
44
43
46
45
48
47
50
49
52
51
54
53
55
63
64
61
62
59...

result:

ok 292 step(s)

Test #145:

score: 0
Accepted
time: 1ms
memory: 3828kb

input:

11110100100010100000000011001000101010010001001101001110011001001011000001000000010011010101011111
10011001011010010111101001001011000110011000011100110011100000001011010001010011011100001001001111

output:

357
0
2
24
46
52
57
66
84
93
95
6
5
7
37
36
38
35
34
37
36
39
38
41
40
42
33
32
35
34
37
36
39
38
41
40
43
42
45
44
47
46
48
55
54
57
56
59
58
60
65
64
67
66
69
68
71
70
72
29
28
31
30
33
32
35
34
37
36
39
38
41
40
43
42
45
44
47
46
49
48
51
50
53
52
55
54
57
56
59
58
61
60
63
62
65
64
67
66
69
68
7...

result:

ok 357 step(s)

Test #146:

score: 0
Accepted
time: 2ms
memory: 3664kb

input:

101110101111100011111000001101010011000101110010001001101011111110010010101000111111101100110010110
100011010001110010001000010001110111110100010101010110001110100000100101110000101100001001100110111

output:

677
2
8
10
16
18
26
34
41
53
58
60
62
78
80
82
86
90
96
21
20
23
22
25
24
27
26
28
13
12
15
14
17
16
19
18
21
20
23
22
25
24
27
26
29
28
30
7
6
9
8
11
10
13
12
15
14
17
16
19
18
21
20
23
22
25
24
27
26
29
28
31
30
33
32
35
34
37
36
38
5
4
7
6
9
8
11
10
13
12
15
14
17
16
19
18
21
20
23
22
25
24
27
26...

result:

ok 677 step(s)

Test #147:

score: 0
Accepted
time: 2ms
memory: 3664kb

input:

1000001100111110101100110011101101000011011111011010011010111000101101011011111000111011010011100
1110010110110000100110101001101101110000100001110110001000010011001111111101111111100000110011100

output:

286
6
10
12
18
22
26
30
38
41
43
47
53
58
66
71
74
76
82
86
92
29
28
31
30
32
17
16
19
18
21
20
23
22
25
24
27
26
29
28
31
30
33
32
35
34
37
36
39
38
41
40
43
42
44
65
64
67
66
68
85
84
87
86
88
95
94
96
79
78
81
80
83
82
85
84
87
86
89
88
91
90
93
92
95
94
0
96
2
1
4
3
6
5
8
7
10
9
12
11
13
61
60
6...

result:

ok 286 step(s)

Test #148:

score: 0
Accepted
time: 2ms
memory: 3788kb

input:

111110111101010111111100110010011111110110111111101011111111111110011111111111111011111111101101111
100011010000100001100110101001001110100001001000010100111110101110001010001000010101101110101011001

output:

496
0
2
6
8
15
17
19
24
31
33
35
39
42
44
46
52
54
56
58
60
62
67
69
71
73
75
77
79
82
84
86
88
92
95
97
5
4
7
6
9
8
10
22
21
24
23
26
25
27
38
37
40
39
42
41
44
43
46
45
47
14
13
16
15
18
17
20
19
22
21
24
23
26
25
28
27
30
29
32
31
34
33
36
35
38
37
40
39
42
41
44
43
46
45
48
47
49
91
90
93
92
95
...

result:

ok 496 step(s)

Test #149:

score: 0
Accepted
time: 0ms
memory: 3844kb

input:

1011111111011101010010011111011111111011111111111001111101111111111101101111111100111011001111111011
1111100111110111110110001000111111100101110010100110001101010010000110100111000100110000100101111110

output:

272
2
4
6
8
11
23
25
29
31
33
35
38
40
42
44
46
51
53
57
59
61
63
65
69
72
74
76
78
82
86
90
92
94
98
1
0
3
2
5
4
7
6
9
8
11
10
12
18
17
19
28
27
30
29
32
31
34
33
36
35
38
37
40
39
42
41
44
43
46
45
47
68
67
70
69
72
71
74
73
76
75
78
77
80
79
82
81
83
56
55
58
57
60
59
62
61
64
63
66
65
68
67
70
6...

result:

ok 272 step(s)

Test #150:

score: 0
Accepted
time: 2ms
memory: 3792kb

input:

111111000100000001010110000011110111001101001010100000001000100010101111001001101110110101100010110
010000010000100000111000011110111100111001000111110100010001000001100011110101111110001000001011010

output:

545
0
2
4
21
28
30
33
38
68
70
77
80
84
89
96
42
41
43
36
35
38
37
40
39
42
41
44
43
45
20
19
22
21
24
23
26
25
28
27
30
29
32
31
34
33
36
35
38
37
40
39
42
41
44
43
46
45
47
18
17
20
19
22
21
24
23
26
25
28
27
30
29
32
31
34
33
36
35
38
37
40
39
42
41
44
43
46
45
48
47
50
49
52
51
54
53
55
10
9
12
...

result:

ok 545 step(s)

Test #151:

score: 0
Accepted
time: 2ms
memory: 3800kb

input:

00000111000110001101110001100010010010010011001110010110000000000010100110110010100100010101010110
00001101111100110100110111100011011111111110111101111111110001011100011000111000101110010100100000

output:

361
5
11
16
19
25
42
46
53
71
74
95
22
21
24
23
26
25
28
27
29
34
33
35
40
39
42
41
44
43
46
45
47
52
51
54
53
56
55
58
57
60
59
62
61
64
63
65
8
7
10
9
12
11
14
13
16
15
18
17
20
19
22
21
24
23
26
25
28
27
30
29
32
31
34
33
36
35
38
37
40
39
42
41
44
43
46
45
48
47
50
49
52
51
54
53
56
55
58
57
60
...

result:

ok 361 step(s)

Test #152:

score: 0
Accepted
time: 2ms
memory: 3780kb

input:

001111101111111111111110111111101110111111011010111111111110011111111111110111011111011011111111111
010010111100010000100001100001101001111110000010011110001000011001110001000101110101010100011010000

output:

527
2
4
8
10
12
14
16
18
20
24
26
28
32
36
38
40
43
48
50
52
54
56
61
63
65
67
69
71
75
79
81
85
88
90
92
94
96
59
58
61
60
63
62
65
64
67
66
69
68
71
70
72
47
46
49
48
51
50
53
52
55
54
57
56
59
58
61
60
63
62
65
64
67
66
69
68
71
70
73
72
75
74
76
35
34
37
36
39
38
41
40
43
42
45
44
47
46
49
48
51...

result:

ok 527 step(s)

Test #153:

score: 0
Accepted
time: 2ms
memory: 3804kb

input:

10111111111101101111110111111011111111111111111100111110110111101111111111011111110100111111111111
10001110111011110000110100011101010000011100010101100010100010001010000100101001000101100111001000

output:

315
2
4
6
8
10
13
16
18
20
23
25
27
30
32
34
36
38
40
42
44
46
50
52
56
59
61
64
66
68
70
72
75
77
79
86
88
90
92
94
96
55
54
57
56
59
58
61
60
63
62
65
64
67
66
69
68
71
70
73
72
75
74
77
76
79
78
80
1
0
3
2
5
4
7
6
9
8
11
10
13
12
15
14
17
16
19
18
21
20
23
22
25
24
27
26
29
28
31
30
33
32
35
34
3...

result:

ok 315 step(s)

Test #154:

score: 0
Accepted
time: 2ms
memory: 3792kb

input:

0001010100110110011101110010001100101111100010101011100010110011011010011110000000111100111000100
1101111100000011000001111011011010111110001111011110001010111011011010101111000010110011101000100

output:

729
10
13
17
21
30
36
38
50
58
62
65
71
73
82
84
88
24
23
25
20
19
22
21
24
23
26
25
28
27
30
29
32
31
33
8
7
10
9
12
11
14
13
16
15
18
17
20
19
22
21
24
23
26
25
28
27
30
29
32
31
34
33
36
35
38
37
39
6
5
8
7
10
9
12
11
14
13
16
15
18
17
20
19
22
21
24
23
26
25
28
27
30
29
32
31
34
33
36
35
38
37
4...

result:

ok 729 step(s)

Test #155:

score: 0
Accepted
time: 2ms
memory: 3848kb

input:

1010001111100000111001111100001101000010011110101001011011110110001010010110111011100110001000001110
0010100001000110010010100001111101101011100110100010011010001011011011001011111110011000110110010010

output:

247
6
8
16
21
23
30
41
43
53
56
58
61
73
76
80
85
96
19
18
21
20
23
22
24
11
10
13
12
15
14
17
16
19
18
21
20
23
22
25
24
27
26
29
28
31
30
32
49
48
50
69
68
70
39
38
3
2
5
4
7
6
9
8
11
10
13
12
15
14
17
16
19
18
21
20
23
22
25
24
27
26
29
28
31
30
33
32
35
34
1
0
3
2
5
4
7
6
9
8
11
10
13
12
15
14
1...

result:

ok 247 step(s)

Test #156:

score: 0
Accepted
time: 2ms
memory: 3824kb

input:

111011011111111010011111110111101111110111111111111111101111111111111110111101111110111111011101011
010010001101111101011110110110001110001110110001110100000010010000100100111100101000001100001001110

output:

281
0
4
7
9
11
13
19
21
23
27
29
32
34
36
39
41
43
45
47
49
51
53
56
58
60
62
64
66
68
72
74
77
79
81
84
86
88
91
97
17
16
19
18
21
20
23
22
24
71
70
73
72
75
74
77
76
79
78
81
80
83
82
85
84
87
86
89
88
91
90
92
3
2
5
4
7
6
9
8
11
10
13
12
15
14
17
16
19
18
21
20
23
22
25
24
27
26
29
28
31
30
33
32...

result:

ok 281 step(s)

Test #157:

score: 0
Accepted
time: 2ms
memory: 3824kb

input:

11111010101000100010110000110110010110111111010011010101101111110000010111111100110101010101000001
01111000011111010000011110010110111110110101010011110010000011111110101101010001100111100111000111

output:

543
0
2
20
26
29
35
38
40
42
48
55
58
60
62
71
73
75
80
19
18
21
20
23
22
25
24
27
26
29
28
31
30
32
15
14
17
16
19
18
21
20
23
22
25
24
27
26
29
28
31
30
33
32
35
34
37
36
39
38
41
40
43
42
44
11
10
13
12
15
14
17
16
19
18
21
20
23
22
25
24
27
26
29
28
31
30
33
32
35
34
37
36
39
38
41
40
43
42
45
4...

result:

ok 543 step(s)

Test #158:

score: 0
Accepted
time: 2ms
memory: 3828kb

input:

1010001100100011000010011011111011000110101000011001001010010100110001010101010010111101011001001
0010100101101010110001010101110011100010010100001110000111110000000110110011111110110100010010110

output:

407
6
14
23
26
28
32
37
47
64
82
84
89
96
43
42
45
44
47
46
49
48
50
57
56
58
55
54
57
56
59
58
60
41
40
43
42
45
44
47
46
49
48
51
50
53
52
55
54
57
56
59
58
61
60
63
62
65
64
67
66
68
31
30
33
32
35
34
37
36
39
38
41
40
43
42
45
44
47
46
49
48
51
50
53
52
55
54
57
56
59
58
61
60
63
62
65
64
67
66
...

result:

ok 407 step(s)

Test #159:

score: 0
Accepted
time: 2ms
memory: 3732kb

input:

1011111110100011001010010010010011010010100001110100100110110110011101111100000010101000100001001101
1100100110000010011000101011000110111001010100001110010001000101100010111100110101111110101010111000

output:

420
2
4
6
14
32
45
55
58
61
65
69
71
96
99
21
20
22
27
26
28
19
18
21
20
23
22
25
24
27
26
29
28
31
30
33
32
34
41
40
43
42
45
44
46
39
38
41
40
43
42
45
44
47
46
48
53
52
55
54
57
56
59
58
61
60
63
62
65
64
66
11
10
13
12
15
14
17
16
19
18
21
20
23
22
25
24
27
26
29
28
31
30
33
32
35
34
37
36
39
38...

result:

ok 420 step(s)

Test #160:

score: 0
Accepted
time: 2ms
memory: 3768kb

input:

01000111111100100111101001010000111000010111110011010101001011001000001100100010010001110011101100
00110001111010011110010110011110110101111011111000010111101010000000010000101100110111011001110101

output:

327
5
7
9
17
19
32
41
43
48
60
70
85
90
94
12
11
13
2
1
4
3
6
5
8
7
10
9
12
11
14
13
16
15
18
17
20
19
21
28
27
30
29
32
31
33
56
55
57
54
53
56
55
58
57
60
59
62
61
63
52
51
54
53
56
55
58
57
60
59
62
61
64
63
66
65
68
67
70
69
72
71
73
46
45
48
47
50
49
52
51
54
53
56
55
58
57
60
59
62
61
64
63
66...

result:

ok 327 step(s)

Test #161:

score: 0
Accepted
time: 2ms
memory: 3796kb

input:

01111011111111111111111010111111110100111111111011111111100111001101101111111111111111111111111111
00110110100011100000100011101101011000001110010010110101001001111101101000010100000100110110111010

output:

389
1
3
6
8
10
12
14
16
18
20
26
28
30
32
38
40
42
44
48
50
52
54
59
64
67
70
72
74
76
78
80
82
84
86
88
90
92
94
96
25
24
27
26
29
28
31
30
33
32
34
57
56
59
58
60
47
46
49
48
51
50
53
52
55
54
57
56
59
58
61
60
63
62
65
64
67
66
69
68
71
70
73
72
75
74
77
76
79
78
81
80
83
82
85
84
87
86
89
88
91
...

result:

ok 389 step(s)

Test #162:

score: 0
Accepted
time: 0ms
memory: 3700kb

input:

1111011111110111001101111111100011111101111011111101111011111111111100111111111111111110111111001
1011100001010000011100000011110111111001111010011001000110111010000100001000100010110110111100001

output:

399
0
2
5
7
9
13
18
21
23
25
27
32
34
36
39
41
44
46
48
51
53
56
58
60
62
64
66
70
72
74
76
78
80
82
84
88
90
92
16
15
18
17
20
19
22
21
24
23
26
25
28
27
30
29
32
31
34
33
36
35
38
37
40
39
42
41
44
43
46
45
48
47
50
49
52
51
54
53
56
55
58
57
60
59
62
61
64
63
66
65
68
67
70
69
72
71
74
73
76
75
7...

result:

ok 399 step(s)

Test #163:

score: 0
Accepted
time: 2ms
memory: 3804kb

input:

11111010111101111111101101111111011100011111111111110101101111110111110111101111001011111111111111
10001011011100011001111000011110000110001111100000010001011110001101101110010111011001111000000111

output:

207
0
2
8
10
13
15
17
19
22
25
27
29
33
39
41
43
45
47
49
55
58
60
62
65
67
71
73
76
78
84
86
88
90
92
94
96
7
6
9
8
11
10
13
12
15
14
17
16
19
18
21
20
23
22
25
24
27
26
29
28
30
5
4
7
6
9
8
11
10
13
12
15
14
17
16
19
18
21
20
23
22
25
24
27
26
29
28
31
30
33
32
34
70
69
72
71
74
73
76
75
78
77
80
...

result:

ok 207 step(s)

Test #164:

score: 0
Accepted
time: 2ms
memory: 3664kb

input:

0001111111001010111010011101011010001001000101011010011010110011111110101111100111010010001000111111
1000001010001011010111010101100011110100101001001000100011000100011000111001100010101011000000100111

output:

243
3
5
7
16
23
29
47
53
58
62
64
66
72
74
79
94
96
98
10
9
11
21
20
23
22
24
19
18
21
20
23
22
25
24
26
37
36
38
33
32
35
34
37
36
39
38
41
40
42
15
14
17
16
19
18
21
20
23
22
25
24
27
26
29
28
31
30
33
32
35
34
37
36
39
38
41
40
43
42
44
77
76
79
78
80
71
70
73
72
75
74
77
76
79
78
81
80
82
91
90
...

result:

ok 243 step(s)

Test #165:

score: 0
Accepted
time: 2ms
memory: 3788kb

input:

0010111101010100001100011000010011100001001010001001111000111011000101001100111110011010111010111
0011010100001101011101101011010100011010100001011001001110011010010110011010000011011010110000110

output:

533
4
6
18
23
32
51
53
58
62
72
76
78
83
88
94
3
2
5
4
7
6
8
30
29
32
31
33
40
39
41
14
13
16
15
18
17
20
19
22
21
24
23
26
25
28
27
30
29
32
31
34
33
36
35
38
37
40
39
42
41
43
12
11
14
13
16
15
18
17
20
19
22
21
24
23
26
25
28
27
30
29
32
31
34
33
36
35
38
37
40
39
42
41
44
43
46
45
47
61
60
63
62...

result:

ok 533 step(s)

Test #166:

score: 0
Accepted
time: 2ms
memory: 3796kb

input:

1110111110111101111111101111111101110111101101111110111101111111111110011111011111111110111111101111
0010001100011101111110111011011110000000100111011111000101101001001100111001100110010110101101100010

output:

226
0
4
6
10
12
15
17
19
21
24
26
28
30
33
37
39
42
45
47
49
52
54
57
59
61
63
65
67
71
73
77
79
81
83
85
88
90
92
96
98
9
8
11
10
13
12
15
14
17
16
19
18
21
20
23
22
25
24
27
26
29
28
31
30
33
32
34
3
2
5
4
7
6
9
8
11
10
13
12
15
14
17
16
19
18
21
20
23
22
25
24
27
26
29
28
31
30
33
32
35
34
37
36
...

result:

ok 226 step(s)

Test #167:

score: 0
Accepted
time: 1ms
memory: 3664kb

input:

1111110111111111110110101111111111110101111101110111111001111111111101111110110100111100011111110011
0101100001011001010111000110011101101001110110101100000001110110000111011111100110100011111100111001

output:

335
0
2
4
7
9
11
13
15
19
24
26
28
30
32
34
39
41
45
49
51
53
57
59
61
63
65
69
71
73
76
82
84
89
91
93
98
18
17
20
19
21
96
95
98
97
35
36
33
34
31
32
29
30
27
28
25
26
23
24
21
22
19
20
17
18
15
16
13
14
11
12
9
10
7
8
5
6
3
4
1
2
41
42
39
40
37
38
35
36
33
34
31
32
29
30
27
28
25
26
23
24
21
22
1...

result:

ok 335 step(s)

Test #168:

score: 0
Accepted
time: 2ms
memory: 3860kb

input:

1000000110000101100011000001101011010110000010101110110101000011110101100101110111000001000010010111
1111111001101110101001110101010000000001000010111110010100011100011011000100011111110111101011010100

output:

188
7
15
20
27
32
37
48
52
62
64
69
75
79
97
99
14
13
16
15
18
17
20
19
22
21
24
23
26
25
28
27
29
36
35
38
37
40
39
42
41
43
51
50
53
52
54
47
46
49
48
51
50
53
52
55
54
56
88
87
90
89
91
96
95
82
81
84
83
86
85
88
87
90
89
92
91
94
93
65
66
63
64
61
62
59
60
57
58
55
56
71
72
69
70
67
68
65
66
63
...

result:

ok 188 step(s)

Test #169:

score: 0
Accepted
time: 2ms
memory: 3700kb

input:

0011111100011110001111100101011100111100111111101000001010000100110110011111011100011100001010100110
0110100000111001111011101010100110001000110100100111001111011101000000110100011001001011010001000000

output:

483
2
4
6
11
13
18
20
29
34
36
40
42
44
64
67
71
73
77
83
97
23
22
24
32
31
34
33
36
35
38
37
40
39
42
41
44
43
45
28
27
30
29
32
31
34
33
36
35
38
37
40
39
42
41
44
43
46
45
47
57
56
59
58
60
55
54
57
56
59
58
61
60
63
62
65
64
67
66
69
68
71
70
73
72
74
86
85
88
87
89
80
79
82
81
84
83
86
85
88
87...

result:

ok 483 step(s)

Test #170:

score: 0
Accepted
time: 0ms
memory: 3804kb

input:

0111101110110100100010001111000101101010110000110110101101011101101011100011011010001011011000100010
1000110110101011111111000010101100101000101011110011001010100101010101001001101010111101110101011010

output:

495
1
3
6
10
24
26
33
40
46
49
54
59
63
68
74
77
86
89
9
8
11
10
12
21
20
23
22
25
24
27
26
29
28
30
53
52
55
54
56
39
38
41
40
43
42
45
44
47
46
49
48
51
50
53
52
55
54
57
56
59
58
60
14
15
12
13
10
11
8
9
6
7
4
5
2
3
0
1
34
35
32
33
30
31
28
29
26
27
24
25
22
23
20
21
18
19
16
17
14
15
12
13
10
11...

result:

ok 495 step(s)

Test #171:

score: 0
Accepted
time: 0ms
memory: 3840kb

input:

1000000111011010110010111110110101011000100110010101110101000110100110011110010010010000011111111
0000100110110101001000000110111010001001100001110101111001110110100111000101011111010010101001100

output:

294
7
11
16
22
24
28
35
43
51
61
67
71
73
89
91
93
95
1
0
3
2
5
4
7
6
8
27
26
29
28
30
21
20
23
22
25
24
27
26
29
28
31
30
32
41
40
43
42
45
44
46
15
14
17
16
19
18
21
20
23
22
25
24
27
26
29
28
31
30
33
32
35
34
37
36
39
38
41
40
43
42
45
44
47
46
48
58
57
60
59
62
61
63
78
77
79
84
83
86
85
88
87
...

result:

ok 294 step(s)

Test #172:

score: 0
Accepted
time: 2ms
memory: 3792kb

input:

11011111111110111111111111111010001111101111110111111111111110111111100111111100111110111011110110
01000000000001100001111110101001101110101011110011000010010111000100100011101110011011100001100100

output:

202
0
3
5
7
9
11
14
16
18
20
22
24
26
34
36
40
42
44
47
49
51
53
55
57
59
62
64
66
71
73
75
80
82
86
90
92
95
69
68
71
70
73
72
75
74
76
39
38
41
40
43
42
45
44
47
46
49
48
51
50
53
52
55
54
57
56
59
58
61
60
63
62
65
64
67
66
31
30
33
32
35
34
82
83
80
81
78
79
76
77
74
75
86
87
84
85
82
83
80
81
7...

result:

ok 202 step(s)

Test #173:

score: 0
Accepted
time: 0ms
memory: 3796kb

input:

010101101111000001110011100011111000000011101101110101110110001010000000010011111011001111100110100
111010101111101001000000010101000010101011010111111010001110000101111110110000011101110000110010110

output:

396
5
8
10
17
22
28
30
40
44
47
53
57
76
78
82
86
88
93
20
19
22
21
23
4
3
6
5
8
7
10
9
12
11
14
13
16
15
18
17
20
19
22
21
24
23
26
25
28
27
30
29
31
2
1
4
3
6
5
8
7
10
9
12
11
14
13
16
15
18
17
20
19
22
21
24
23
26
25
28
27
30
29
32
31
34
33
36
35
38
37
40
39
41
56
55
58
57
60
59
61
52
51
54
53
56...

result:

ok 396 step(s)

Test #174:

score: 0
Accepted
time: 2ms
memory: 3792kb

input:

1111011011111101011110111111111111101111101111011110111111111011111101111111111111011111111111111111
1000001011110101001111011011001011100001110100001001110011101100000010010111001111100001001100001100

output:

228
0
2
5
8
10
12
17
19
22
24
26
28
30
32
36
38
42
44
47
49
52
54
56
58
62
64
66
69
71
73
75
77
79
83
85
87
89
91
93
95
97
16
15
18
17
20
19
22
21
24
23
26
25
28
27
30
29
32
31
33
61
60
63
62
65
64
67
66
69
68
71
70
73
72
75
74
77
76
79
78
80
41
40
43
42
45
44
47
46
49
48
51
50
53
52
55
54
57
56
59
...

result:

ok 228 step(s)

Test #175:

score: 0
Accepted
time: 0ms
memory: 3796kb

input:

11111111111101000110100101011101010010000101011111111111101000110001110111100111001100011100011100
11010111110110101100010000111110010001110011110001000111111111100111010000100100011101001100001101

output:

185
0
2
4
6
8
10
17
27
45
47
49
51
53
55
62
67
71
73
77
82
87
93
14
13
16
15
18
17
19
34
33
35
44
43
46
45
48
47
50
49
52
51
54
53
56
55
57
96
95
80
79
82
81
70
69
72
71
74
73
76
75
42
41
44
43
46
45
48
47
50
49
52
51
54
53
56
55
58
57
60
59
62
61
64
63
66
65
32
31
34
33
36
35
38
37
40
39
42
41
44
4...

result:

ok 185 step(s)

Test #176:

score: 0
Accepted
time: 2ms
memory: 3792kb

input:

0110100000010000001000011110101101001101110100011001001000101000101101110110100000110011010111000
1001010100111101000010011111000010111000010010101110110100100110110001000101100101101011011111101

output:

366
1
23
25
30
36
39
47
66
69
73
82
86
91
5
4
7
6
9
8
10
29
28
31
30
32
19
18
21
20
23
22
25
24
27
26
29
28
31
30
33
32
35
34
37
36
39
38
40
52
51
53
44
43
46
45
48
47
50
49
52
51
54
53
56
55
57
65
64
67
66
69
68
70
77
76
79
78
81
80
83
82
85
84
87
86
88
61
60
63
62
65
64
67
66
69
68
71
70
73
72
75
...

result:

ok 366 step(s)

Test #177:

score: 0
Accepted
time: 2ms
memory: 3660kb

input:

1000101101110110001101111111011001010001100101111100010001011101010010011001101010001001100011101100
0011011111110011111010011111111111100001000111001010100000000100110001100001011101001111110101111111

output:

431
6
9
13
18
21
23
25
29
39
45
47
59
71
75
87
92
96
5
4
7
6
9
8
10
1
0
3
2
5
4
7
6
9
8
11
10
13
12
15
14
17
16
19
18
21
20
23
22
25
24
26
66
65
67
64
63
66
65
68
67
70
69
72
71
74
73
76
75
77
62
61
64
63
66
65
68
67
70
69
72
71
74
73
76
75
78
77
79
58
57
60
59
62
61
64
63
66
65
68
67
70
69
72
71
74...

result:

ok 431 step(s)

Test #178:

score: 0
Accepted
time: 2ms
memory: 3700kb

input:

01100101010111101000011110111000000001111001110100001000110011000011011101110111110101011001101100
11010001001100011111100110000010111101111101111111111011110110110100110101010111001111000100110010

output:

144
1
11
13
21
23
26
37
39
43
56
60
66
69
73
77
79
87
91
94
10
9
12
11
14
13
15
8
7
10
9
12
11
14
13
16
15
18
17
20
19
22
21
24
23
26
25
27
48
47
50
49
51
3
4
43
44
41
42
69
70
67
68
65
66
73
74
71
72
79
80
77
78
75
76
73
74
81
82
79
80
77
78
75
76
83
84
81
82
79
80
95
93
94
91
92
89
90
29
27
28
25
...

result:

ok 144 step(s)

Test #179:

score: 0
Accepted
time: 2ms
memory: 3720kb

input:

1101100010010111001001101100101011010101100000010100010010011001001010011111111001101111000000011010
0101010111001000000111010100000011111100101110111110101001001101100001101101101110110011010110101011

output:

419
0
3
13
21
24
32
39
59
71
73
75
77
81
84
86
95
9
8
10
16
15
17
31
30
33
32
34
29
28
31
30
33
32
35
34
36
54
53
55
64
63
65
50
49
52
51
54
53
56
55
58
57
60
59
62
61
64
63
66
65
67
48
47
50
49
52
51
54
53
56
55
58
57
60
59
62
61
64
63
66
65
68
67
70
69
72
71
74
73
76
75
78
77
80
79
82
81
84
83
86
...

result:

ok 419 step(s)

Test #180:

score: 0
Accepted
time: 3ms
memory: 3828kb

input:

10111111111101111110101101111111111011111111111101111101111110111011111011101111111101101111101111
10110010110100101011100001100000000110010110101011000100101110000001110000110110101101111110000111

output:

246
2
4
6
8
10
13
15
17
22
25
27
29
31
33
36
38
40
42
44
46
49
51
55
57
59
62
66
68
72
76
78
80
82
85
88
90
94
96
21
20
23
22
25
24
27
26
29
28
31
30
33
32
35
34
37
36
39
38
41
40
43
42
45
44
47
46
49
48
51
50
52
1
0
3
2
5
4
7
6
9
8
11
10
13
12
62
63
60
61
58
59
56
57
54
55
52
53
50
51
48
49
46
47
4...

result:

ok 246 step(s)

Test #181:

score: 0
Accepted
time: 1ms
memory: 3800kb

input:

110111110101110110001101111101111011111111100110101111101010111110011111111111111111011111111111111
110011101101001101101010100111010101011100111001010101110000110111001001101010010101100101111011100

output:

516
0
3
5
11
15
20
23
25
29
31
34
36
38
40
45
50
52
60
62
67
69
71
73
75
77
79
81
85
87
89
91
93
95
97
28
27
30
29
32
31
34
33
36
35
38
37
40
39
41
14
13
16
15
18
17
20
19
22
21
24
23
26
25
28
27
30
29
32
31
34
33
36
35
38
37
40
39
42
41
44
43
46
45
47
10
9
12
11
14
13
16
15
18
17
20
19
22
21
24
23
...

result:

ok 516 step(s)

Test #182:

score: 0
Accepted
time: 1ms
memory: 3704kb

input:

1111111000111110101111101111011111100101110111111111101111111111111111101111110111111110110111111
0000100111010101000000001101110101011001110100101101111111110000100111011111011011100000110000100

output:

508
0
2
4
10
12
18
20
24
26
29
31
33
39
43
45
47
49
51
54
56
58
60
62
64
66
68
72
74
76
79
81
83
85
88
91
93
95
23
22
25
24
27
26
29
28
31
30
33
32
35
34
36
17
16
19
18
21
20
23
22
25
24
27
26
29
28
31
30
33
32
35
34
37
36
39
38
40
71
70
73
72
75
74
77
76
79
78
81
80
83
82
85
84
87
86
89
88
91
90
93...

result:

ok 508 step(s)

Test #183:

score: 0
Accepted
time: 3ms
memory: 3772kb

input:

001101000111000001110010000001010001000110001101000010011011001110110010101000100110101100001110111
000110001001111111000100000001100000101000111100001111110111100111001111110100001100101100100011101

output:

525
2
9
17
39
44
55
58
62
66
81
86
92
96
20
19
21
48
47
50
49
51
36
35
38
37
40
39
42
41
44
43
46
45
48
47
50
49
52
51
54
53
56
55
58
57
60
59
62
61
63
32
31
34
33
36
35
38
37
40
39
42
41
44
43
46
45
48
47
50
49
52
51
54
53
56
55
58
57
60
59
62
61
64
63
66
65
68
67
69
30
29
32
31
34
33
36
35
38
37
4...

result:

ok 525 step(s)

Test #184:

score: 0
Accepted
time: 0ms
memory: 3788kb

input:

1111100110001111000110001101111100010100011000101010111101000101000011010101001101100110110110101
1001001111000001100100000010111100011000001000010011011011011111101010110000111111000110010111100

output:

358
0
2
7
12
14
19
24
27
29
41
52
54
68
78
81
85
88
91
5
4
7
6
9
8
11
10
13
12
15
14
17
16
19
18
21
20
23
22
25
24
27
26
29
28
30
38
37
40
39
42
41
44
43
45
36
35
38
37
40
39
42
41
44
43
46
45
47
51
50
53
52
55
54
56
76
75
78
77
80
79
82
81
84
83
86
85
88
87
90
89
92
91
93
74
73
76
75
78
77
80
79
82...

result:

ok 358 step(s)

Test #185:

score: 0
Accepted
time: 1ms
memory: 3792kb

input:

101111111111111111111111101110111011111101011110111011111111110110101111111111111001101111101111111
100100110100100001011110000010111100001100110111101100111001010011010010110000110100001101100100010

output:

399
2
4
6
8
10
12
14
16
18
20
22
26
30
34
36
38
43
45
48
52
54
56
58
60
63
68
70
72
74
76
78
83
86
88
92
94
96
98
33
32
35
34
37
36
39
38
40
91
90
93
92
95
94
97
96
0
98
2
1
4
3
6
5
8
7
10
9
12
11
14
13
16
15
18
17
20
19
22
21
23
81
80
83
82
85
84
87
86
89
88
91
90
93
92
95
94
97
96
0
98
2
1
4
3
6
5...

result:

ok 399 step(s)

Test #186:

score: 0
Accepted
time: 3ms
memory: 3860kb

input:

1111011111111111111111111101111111100111111011111111111111111111111111111010111011101111111111111
1101010111110010111001110001110111011000101010110011001101100111101111110010000010000100111011111

output:

500
0
2
5
7
9
11
13
15
17
19
21
23
27
29
31
33
37
39
41
44
46
48
50
52
54
56
58
60
62
64
66
68
70
76
80
84
86
88
90
92
94
26
25
28
27
30
29
32
31
34
33
36
35
38
37
40
39
42
41
44
43
46
45
48
47
50
49
52
51
54
53
56
55
58
57
60
59
62
61
64
63
66
65
68
67
70
69
71
0
96
2
1
4
3
6
5
8
7
10
9
12
11
14
13...

result:

ok 500 step(s)

Test #187:

score: 0
Accepted
time: 2ms
memory: 3704kb

input:

0110000100010111110000010000101110000110010011000000010010110110101010010100100110000011111010001
1110111000111110010110101001011101001111011010011111010010011101100110110100010101011011000111100

output:

596
1
13
15
30
37
44
58
61
79
86
88
24
23
26
25
27
18
17
20
19
22
21
24
23
26
25
28
27
30
29
31
54
53
55
42
41
44
43
46
45
48
47
50
49
52
51
54
53
56
55
58
57
60
59
62
61
63
12
11
14
13
16
15
18
17
20
19
22
21
24
23
26
25
28
27
30
29
32
31
34
33
36
35
38
37
40
39
42
41
44
43
46
45
48
47
50
49
52
51
...

result:

ok 596 step(s)

Test #188:

score: 0
Accepted
time: 2ms
memory: 3792kb

input:

1111010101111111110000110011101111111100110000101010011110110000101100110010100110101101101000000010
1000001001000100110110101110000001011010001100101010010010101000000110010101011010111111000111101010

output:

315
0
2
9
11
13
15
22
26
30
32
34
36
40
53
55
58
66
70
79
84
87
18
17
20
19
22
21
24
23
26
25
27
8
7
10
9
12
11
14
13
16
15
18
17
20
19
22
21
24
23
26
25
28
27
30
29
32
31
34
33
36
35
38
37
40
39
42
41
44
43
45
6
5
8
7
10
9
12
11
14
13
16
15
18
17
20
19
22
21
24
23
26
25
28
27
30
29
32
31
34
33
36
3...

result:

ok 315 step(s)

Test #189:

score: 0
Accepted
time: 2ms
memory: 3800kb

input:

01101111111011011010010111111101111111111111000011111111111101111111111111111111111111111111011011
00001100001000101111011101110101100010110001011001100100010110111110101001001111011000000110010011

output:

193
1
4
6
8
12
15
23
25
27
31
33
35
37
39
41
48
50
52
54
56
58
61
63
65
67
69
71
73
75
77
79
81
83
85
87
89
93
96
19
18
20
11
10
13
12
15
14
17
16
19
18
21
20
23
22
25
24
27
26
28
92
91
44
43
46
45
48
47
50
49
52
51
54
53
56
55
58
57
60
59
62
61
64
63
66
65
68
67
70
69
72
71
69
67
68
65
66
63
64
61
...

result:

ok 193 step(s)