Result

WA

Duration

632ms

Code [DL]

r=0;gets.chars.map(&:to_i).each{|x|puts(r^=x)}

stdin

1011010010000110001101111010001001111111011100101111100110011111000111000000111101101110111110001001

stdout

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

stderr