Result

AC

Code [DL]

vv+1::+1$_99g-!.
0>*:99g\`^
v^+1::0p99$_+2*
>#@~'0-:0\`^

stdin

00011001
11000100
01111000
01101001
11011110
00100100
10111100
00001010
00011100
10000110
11110100
00000001
11001101
01100001
11110001
00000000
10011001
01101111
00010011
00110111
11010010
01000010
11011001
00001111
01101100
01001110
01011011
11110111
10111110
00010101
11111111
01010100
10001000
00101101
01011000
00000110
10001000
11111101
00000011
11100111
10001011
11100001
11111000
01100100
00000011
00111111
10111111
11011100
00010111
10101011

stdout

0 0 1 1 0 1 0 1 1 0 0 1 0 0 0 1 1 0 0 1 1 1 0 1 0 1 1 0 1 1 0 0 1 1 0 1 1 1 1 1 0 0 0 0 1 0 0 0 0 1 

stderr

strace