Result

AC

Code [DL]

:$<;
(.+?)\n(.*);:,$($1) $2;
(.+)0:$1 $1
(.+)1:$1 $1"a"
1:"a"
.*,:"1"
(.*),\1(.*):a$1,$2
.*,.*:"0"
.:""

stdin

01111011
10111100
10111111
10111101
01100111
11100111
10111010
11111101
01111000
00110100
10011001
01001100
10110111
00001010
01100110
00000001
01000010
00110111
00111000
11100110
00010101
11101000
00001111
01011011
11010010
01111101
00000000
10001111
00010110
00101011
00011100
10000100
00000011
00100100
00010101
10111110
00101100
00101101
10010000
01001110
00011100
11010000
00100101
00011111
01101001
10001000
11001011
10101011
01110100
00000110

stdout

00000101101001011100101110100010111101011000110101

stderr

strace