Result

WA

Code [DL]

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

stdin

11111101
11001110
00110000
00000011
10000110
10111000
00000001
10011001
10100001
01111011
01100011
11001100
10011001
11010001
00010101
00101111
11010111
11010010
00001111
11100001
10110111
11000001
11100111
00011011
10101001
10101011
00001010
01000010
00110111
11000111
01011011
00001010
00101101
01101100
11110000
10001000
00110001
01111000
10110010
11000000
00000110
01101101
01101001
10101110
01001111
00100100
10111110
00000000
01001110
00011100

stdout

stderr

strace