Result

AC

Code [DL]

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

stdin

11100111
00100100
11000010
11101111
01101001
00000011
00111010
01011011
01001110
01010111
11110111
00010101
00001010
00110011
01110001
00001001
00001111
11010010
11100111
01111000
00101101
00011100
00111111
00000001
00000110
01000010
01001000
11111101
10100001
00110111
10011001
00000111
01010001
01101110
00101011
11011001
10000000
00000000
10101011
00000100
11100101
10111110
10001100
10001000
01111001
10101110
11010011
01001110
11001001
00001011

stdout

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

stderr

strace