Result

AC

Code [DL]

a5*0v
=?v+>2*i:68*-$a
}v>~:1+0
1< v!?:}+{=*+1:@:{:}-
?.;>{n~~1-:20{

stdin

00000110
10010110
01011011
01101001
11111111
11110110
11111101
11010010
00101100
11111101
10000110
00000111
01000011
00000011
01010101
10010010
00000000
11111011
00101110
10011010
10000000
00000010
11100100
00101101
01001110
10110010
10101011
11010011
10011001
10001100
10001010
00000001
00001111
01101110
00010101
10111110
01011101
10100001
00011100
01111000
10100010
00100100
11000101
00110111
10001000
11100111
01000010
00001010
00000001
10101010

stdout

10110011010001001000000110101001101100110101111110

stderr

strace