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

00001010
11100111
00000000
11111101
11000011
01001001
10100000
00001111
11011110
00011100
00000000
00010000
01001110
01111100
10011001
00110111
10111100
10001000
01101101
10100110
11010010
01001010
11011100
00101101
00110000
10111000
00010111
01110111
10101011
01000010
00000001
01011011
10111110
01111000
00000110
00010101
00000011
01011010
01010100
00100100
10101101
01000010
01101001
11001111
00001011
11010001
11101010
10101100
01010111
10111111

stdout

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

stderr

strace