Result

AC

Code [DL]

module cat;integer c,i,d,s;initial begin s=1<<31; c=$fgetc(s);while(!(&c))begin d=0;i=1;while(c!=10)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

10101000
00000000
00010101
10101110
00101101
00001101
11100110
01000111
00000110
11101000
11110001
01111111
11101010
00001111
11100111
01110011
10111110
11111111
01011011
10010000
00000001
00110001
01111000
00110111
00011100
01100010
10011001
01000010
11000000
10000100
01110000
01001110
10010010
11011101
00110110
01011101
11111101
11001000
00100100
11010010
11001111
10001000
01000010
00001010
01110110
01101001
00000000
00000011
10101011
11101100

stdout

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

stderr

strace