Result

AC

Code [DL]

module cat;integer c,i,d,s;initial begin s=32'h8000_0000; c=$fgetc(s);while(!(&c))begin d=0;i=1;while(c==48||c==49)begin d=d*2;d=d+c-48;c=$fgetc(s);end i=1;while(d>0)begin d=d-i;i=i+1;end if(d==0)begin $write("%d ",1);end else begin $write("%d ",0);end c=$fgetc(s);end end endmodule

stdin

00101101
01010101
00000110
10011111
01000001
11011000
00110010
10100011
01111001
10011001
10111110
01000010
10000011
10001000
00010100
11010111
11100111
01011011
11010010
10100101
00001010
00001111
01111000
01111110
00000000
00010101
10010000
11100000
01001110
00010010
11001101
00011110
00100100
01101101
01100010
00000001
01101001
01000011
11100110
00011100
00000001
11000010
11001111
11110110
00001111
11111101
10101011
00000011
00110111
01101110

stdout

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

stderr

strace