Result

AC

Code [DL]

WITH RECURSIVE m(x,l,r,p)AS(SELECT 1,'' AS l,substr(v,10) AS r,substr(v,1,8) AS p FROM i UNION ALL SELECT x + 1,CASE WHEN p IN('00000000','00000001','00000011','00000110','00001010','00001111','00010101','00011100','00100100','00101101','00110111','01000010','01001110','01011011','01101001','01111000','10001000','10011001','10101011','10111110','11010010','11100111','11111101')THEN 1 ELSE 0 END AS l,substr(r,10) AS r,substr(r,1,8) AS p FROM m WHERE p != '')SELECT l FROM m WHERE l!=''

stdin

00100100
01000101
00000011
11100111
00001010
10001000
10001101
11000101
01111110
01011011
10111101
11010010
01101001
01000010
11111010
00100110
11111101
00110111
00001111
00101101
10100010
10101011
01001110
11010010
00011001
10110010
10111111
11101101
11011010
10000010
11001010
01011010
00011100
10001100
01111011
00010000
00101001
00010101
11001000
00000000
01111000
10011001
00011100
10111110
00000110
10100011
00110011
00000001
10011011
11011101

stdout

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

stderr

strace