QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#266653#5156. Going in CirclesdXqwq#AC ✓16ms5708kbC++231.4kb2023-11-26 16:18:442023-11-26 16:18:44

详细

Test #1:

score: 100
Accepted
time: 8ms
memory: 4000kb

input:

0
1
0
0
1
0
0
0
1
0
1
0
1
0
1
0
0
1
0
1
0
1
0
0
0
0
1
0
1
1
1
1
1
0
1
1
1
1
0
1
0
0
0
0
1
0
1
0
1
0
0
0
1
1
0
0
0
0
0
0
0
1
0
0
1
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
1
1
0
0
0
1
0
1
0
1
0
0
0
0
1
0
1
1
1
1
0
0
0
1
0
1
1
1
1
1
1
1
0
1
0
1
0
1
0
1
0
0
1
0
0
0
0
0
0
0
1
1
0
1
1
1
0
0
0
0
0
0
0
1
0
0
1
0
1
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 5291.

Test #2:

score: 0
Accepted
time: 7ms
memory: 3716kb

input:

1
0
1
1
1
0
1
1
0
1
1
1
0
0
1
0
0
0
1
1
1
0
1
1
0
0
1
1
0
0
0
0
1
0
0
0
0
0
1
1
0
0
1
1
0
1
1
1
0
0
0
0
0
1
1
0
1
0
1
0
1
0
0
1
0
0
0
1
0
0
1
0
0
1
0
1
0
1
0
1
1
0
0
0
0
0
1
1
1
0
1
1
0
0
1
1
0
0
0
0
0
0
0
1
0
0
0
0
1
1
1
1
0
0
1
1
0
0
0
1
0
1
0
1
0
0
1
0
1
1
0
1
0
1
1
0
1
1
0
1
0
0
1
0
1
0
1
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 5134.

Test #3:

score: 0
Accepted
time: 0ms
memory: 3740kb

input:

0
0
1
0
0
1
0
1
0
0
0
1
1
0
0
1
0
1
1
0
0
0
1
0
1
0
0
1
0
0
1
0
0
1
0
1
0
0
1
0
0
1
0
1
0
0
0
1
1
0
1
0
0
0
1
1
0
0
1
1
0
1
0
0
1
0
0
1
0
1
0
0
1
0
1
1
0
0
1
1
0
0
0
1
0
1
1
0
0
0
1
0
1
0
0
1
0
0
1
0
1
0
1
1
0
0
0
0
1
1
0
1
0
0
1
0
1
1
0
1
0
0
0
0
1
0
1
1
0
0
1
1
1
0
1
1
0
0
1
1
0
1
0
0
0
0
1
0
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 5286.

Test #4:

score: 0
Accepted
time: 0ms
memory: 3812kb

input:

0
0
1
0
1
0
0
1
0
0
1
0
0
1
1
0
1
0
0
1
0
0
1
0
0
0
0
1
1
0
1
1
1
0
1
1
0
1
1
0
0
0
0
1
0
0
1
0
0
1
0
1
1
0
0
1
0
0
1
0
1
0
1
0
1
0
0
1
0
1
0
1
0
1
0
1
0
0
1
0
0
1
1
0
1
0
0
1
0
0
1
0
0
0
0
1
1
0
1
1
0
1
0
1
0
1
0
1
0
1
0
1
1
1
1
1
0
0
0
0
0
1
1
0
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
0
1
1
0
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 4384.

Test #5:

score: 0
Accepted
time: 8ms
memory: 3720kb

input:

0
0
1
0
1
0
0
1
0
0
0
1
0
0
1
0
0
0
1
0
0
0
1
0
0
0
0
1
1
0
1
1
1
0
1
1
0
1
1
0
0
0
0
1
0
0
0
1
0
0
0
1
1
1
0
0
1
0
0
1
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
0
0
1
0
0
1
1
1
0
0
0
1
0
0
0
1
0
0
0
0
1
1
0
1
1
0
1
0
1
0
1
0
1
0
1
0
1
1
1
1
1
0
0
0
0
0
1
1
0
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
0
1
1
0
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 4385.

Test #6:

score: 0
Accepted
time: 2ms
memory: 3800kb

input:

0
0
1
0
1
0
0
1
0
0
0
0
1
0
0
1
0
1
0
0
0
0
1
0
0
0
0
1
1
0
1
1
1
0
1
1
0
1
1
0
0
0
0
1
0
0
0
0
1
0
1
1
1
1
1
0
0
1
0
0
1
0
1
0
1
0
1
0
0
1
0
1
0
1
0
0
1
0
0
1
1
1
1
1
0
1
0
0
0
0
1
0
0
0
0
1
1
0
1
1
0
1
0
1
0
1
0
1
0
1
0
1
1
1
1
1
0
0
0
0
0
1
1
0
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
0
1
1
0
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 4384.

Test #7:

score: 0
Accepted
time: 3ms
memory: 3796kb

input:

0
0
0
0
0
1
0
0
0
0
1
0
0
0
0
1
0
0
0
1
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 5281.

Test #8:

score: 0
Accepted
time: 7ms
memory: 3772kb

input:

0
0
0
0
0
1
0
0
0
0
1
0
0
0
0
1
0
0
0
1
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 5132.

Test #9:

score: 0
Accepted
time: 0ms
memory: 3672kb

input:

0
0
0
0
0
1
0
0
0
0
1
0
0
0
0
1
0
0
0
1
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 5281.

Test #10:

score: 0
Accepted
time: 3ms
memory: 3808kb

input:

0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 4377.

Test #11:

score: 0
Accepted
time: 0ms
memory: 3668kb

input:

0
0
0
0
0
1
0
0
0
0
1
0
0
0
0
1
0
0
0
1
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 4377.

Test #12:

score: 0
Accepted
time: 0ms
memory: 3796kb

input:

0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
1
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 4378.

Test #13:

score: 0
Accepted
time: 1ms
memory: 3792kb

input:

0
0
0
0
0
1
0
0
0
0
0
1
0
1
0
1
1
0
1
0
0
0
0
0
1
1
0
0
0
1
1
0
0
1
0
1
1
0
0
0
1
1
0
0
0
0
0
1
0
1
1
0
1
1
0
0
0
1
0
0
0
0
0
1
1
1
1
0
1
1
1
0
0
0
0
0
1
0
0
0
1
1
0
1
1
0
1
0
0
0
0
0
1
1
0
0
0
1
1
0
1
1
0
1
0
0
1
1
1
0
1
0
1
1
0
1
0
1
1
1
0
0
0
0
0
1
0
0
0
1
1
0
1
0
0
1
1
0
0
0
1
0
0
0
0
0
1
1
1
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 182.

Test #14:

score: 0
Accepted
time: 5ms
memory: 3792kb

input:

0
0
0
0
0
1
0
0
0
0
1
0
0
1
1
0
1
0
0
1
0
0
0
0
1
0
0
0
0
0
1
0
0
1
0
1
0
0
0
0
0
1
0
0
0
0
1
0
0
1
0
0
1
0
1
0
1
0
0
1
1
1
0
0
1
0
1
0
0
1
0
0
1
1
1
0
0
1
0
1
0
1
0
0
1
0
0
1
0
0
0
0
1
0
0
0
0
0
1
0
1
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
1
0
1
0
0
0
0
0
0
0
1
1
1
0
0
0
0
1
0
0
0
1
1
1
0
0
0
0
0
0
0
1
0
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 1976.

Test #15:

score: 0
Accepted
time: 0ms
memory: 3800kb

input:

0
0
0
0
0
1
0
0
0
0
1
0
0
0
1
0
0
0
0
1
0
0
0
0
1
0
0
0
0
0
0
1
0
1
1
0
0
0
0
0
0
1
0
0
0
0
1
0
0
0
0
1
1
1
0
1
1
1
0
0
0
1
0
1
1
0
1
0
0
1
1
0
1
0
0
0
1
1
1
0
1
1
1
0
0
0
0
1
0
0
0
0
1
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
1
0
1
0
0
0
0
0
0
0
0
1
1
1
0
1
1
0
0
0
0
0
0
0
0
1
0
1
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 3493.

Test #16:

score: 0
Accepted
time: 3ms
memory: 5708kb

input:

0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
1
1
1
0
0
1
0
1
1
1
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
0
1
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
1
0
0
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 5186.

Test #17:

score: 0
Accepted
time: 0ms
memory: 3672kb

input:

0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
1
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
1
0
0
1
0
1
0
0
0
0
1
0
0
0
1
0
1
0
0
1
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 5105.

Test #18:

score: 0
Accepted
time: 7ms
memory: 3772kb

input:

0
0
0
0
1
0
0
0
0
0
0
0
1
0
1
0
0
1
0
0
0
0
0
0
0
0
0
1
1
0
0
1
1
0
1
0
0
1
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
1
0
0
1
1
0
0
1
0
1
0
1
1
0
1
0
0
1
1
0
0
1
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
1
0
0
1
0
1
0
0
0
0
0
1
0
0
1
1
0
1
0
0
1
0
0
0
0
0
1
0
0
1
1
0
1
0
1
1
0
1
1
1
0
1
0
1
1
0
0
1
0
0
0
0
0
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 5101.

Test #19:

score: 0
Accepted
time: 10ms
memory: 4004kb

input:

1
0
0
0
0
1
0
0
0
1
1
1
1
1
0
1
1
1
1
1
1
0
0
0
1
1
0
1
0
0
0
0
1
0
0
0
0
0
1
0
1
1
0
0
0
1
1
1
1
1
1
0
0
0
1
1
0
0
1
1
1
1
1
1
1
0
0
1
0
1
1
1
1
1
1
1
0
0
1
1
0
0
0
1
1
1
1
1
1
0
0
0
1
1
0
1
0
0
0
0
0
1
0
1
0
0
0
0
1
0
1
0
0
0
0
1
1
1
1
0
0
0
0
1
0
1
0
0
0
1
0
0
0
1
0
0
1
0
0
0
1
0
1
0
0
0
0
1
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 5111.

Test #20:

score: 0
Accepted
time: 0ms
memory: 3800kb

input:

0
0
1
1
1
0
1
1
0
0
0
1
0
0
0
1
0
0
1
0
0
0
1
1
0
1
1
0
0
0
1
1
1
0
1
1
0
0
0
1
1
0
1
1
0
0
0
1
0
0
1
1
1
0
0
1
1
0
1
1
1
0
1
0
0
0
1
0
0
0
0
1
0
1
1
1
0
1
1
0
0
1
1
1
0
0
1
0
0
0
1
1
0
1
1
0
0
0
1
1
0
0
0
0
0
1
1
1
1
1
0
0
1
0
0
1
0
0
0
0
1
1
1
1
1
0
0
1
0
1
1
0
0
1
0
1
1
0
1
0
0
1
1
1
1
1
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 5205.

Test #21:

score: 0
Accepted
time: 10ms
memory: 4052kb

input:

1
0
0
0
1
0
0
0
0
1
1
1
0
0
0
1
0
0
1
1
1
0
0
0
0
0
1
1
0
1
1
1
1
0
1
1
1
0
1
1
0
0
0
0
0
1
1
1
0
0
1
1
0
1
1
0
0
1
1
1
1
1
1
0
0
0
1
0
0
0
0
1
1
1
1
1
1
0
0
1
1
0
1
1
0
0
1
1
1
0
0
0
0
0
1
1
0
1
1
1
0
1
0
1
0
0
0
1
0
1
1
0
1
1
1
1
1
1
1
0
0
0
1
0
1
1
1
0
0
0
1
1
0
1
1
1
0
0
0
1
1
1
0
1
0
0
0
1
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 5277.

Test #22:

score: 0
Accepted
time: 0ms
memory: 4000kb

input:

1
1
1
1
0
1
1
1
1
1
0
1
0
1
1
0
1
0
1
0
1
1
1
1
1
0
0
1
1
1
1
0
1
0
0
1
1
1
1
0
0
1
1
1
1
1
0
1
0
1
0
0
1
1
0
1
0
0
1
1
0
0
1
0
1
1
0
1
1
1
0
1
0
0
1
1
0
0
1
0
1
1
0
0
1
0
1
0
1
1
1
1
1
0
0
1
1
1
1
0
0
1
0
0
1
0
1
0
0
0
1
1
1
1
0
1
1
0
0
1
1
1
0
0
0
1
1
1
1
0
1
1
0
1
1
1
0
1
1
1
1
0
0
0
1
1
1
0
0
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 4814.

Test #23:

score: 0
Accepted
time: 0ms
memory: 3944kb

input:

1
1
0
0
1
0
0
0
1
1
1
0
1
1
1
0
1
1
0
1
1
1
0
0
0
1
1
1
0
0
1
0
1
0
0
1
0
0
1
1
1
0
0
0
1
1
1
0
1
1
0
0
1
0
1
1
1
1
0
1
0
1
0
1
1
1
1
0
1
1
1
0
1
0
1
0
1
1
1
1
0
1
0
0
1
1
0
1
1
1
0
0
0
1
1
1
0
0
1
0
0
1
0
1
1
0
1
0
0
1
1
0
0
1
0
1
1
0
1
1
0
1
0
1
0
1
0
0
1
0
1
1
0
1
1
1
0
1
0
0
1
0
1
0
1
0
1
1
0
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 5020.

Test #24:

score: 0
Accepted
time: 0ms
memory: 3716kb

input:

0
1
1
0
1
0
0
1
1
0
1
1
1
0
0
1
0
1
1
1
0
1
1
0
0
1
0
1
1
0
1
0
1
0
0
1
0
1
1
0
1
0
0
1
1
0
1
1
1
0
1
0
0
0
0
1
1
0
0
0
1
1
1
1
0
0
0
1
0
0
1
1
1
1
0
0
0
1
1
0
0
0
0
1
0
1
1
1
0
1
1
0
0
1
0
1
1
0
1
0
0
0
1
0
1
1
0
1
1
1
1
1
0
1
0
1
0
1
0
1
1
1
0
1
0
1
1
0
1
0
1
0
1
0
0
1
0
1
0
1
1
0
1
0
1
1
1
0
1
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 5170.

Test #25:

score: 0
Accepted
time: 5ms
memory: 3796kb

input:

0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 4722.

Test #26:

score: 0
Accepted
time: 0ms
memory: 3712kb

input:

0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 5172.

Test #27:

score: 0
Accepted
time: 7ms
memory: 3716kb

input:

0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 5198.

Test #28:

score: 0
Accepted
time: 5ms
memory: 3712kb

input:

0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 4271.

Test #29:

score: 0
Accepted
time: 0ms
memory: 4056kb

input:

1
1
1
1
1
0
1
1
0

output:

? right
? right
? right
? right
? flip
? left
? left
? left
! 3

result:

ok Queries used; 8.

Test #30:

score: 0
Accepted
time: 1ms
memory: 3656kb

input:

1
1
1
1
1
0
1
1
1
0

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
! 4

result:

ok Queries used; 9.

Test #31:

score: 0
Accepted
time: 1ms
memory: 3732kb

input:

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

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
! 5

result:

ok Queries used; 20.

Test #32:

score: 0
Accepted
time: 0ms
memory: 3700kb

input:

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

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
! 6

result:

ok Queries used; 21.

Test #33:

score: 0
Accepted
time: 1ms
memory: 3700kb

input:

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

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
! 7

result:

ok Queries used; 22.

Test #34:

score: 0
Accepted
time: 1ms
memory: 3696kb

input:

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

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
! 8

result:

ok Queries used; 23.

Test #35:

score: 0
Accepted
time: 1ms
memory: 4060kb

input:

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

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 42.

Test #36:

score: 0
Accepted
time: 0ms
memory: 3952kb

input:

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

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 43.

Test #37:

score: 0
Accepted
time: 2ms
memory: 3660kb

input:

1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 391.

Test #38:

score: 0
Accepted
time: 5ms
memory: 3980kb

input:

1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 1053.

Test #39:

score: 0
Accepted
time: 5ms
memory: 3988kb

input:

1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 2258.

Test #40:

score: 0
Accepted
time: 0ms
memory: 3716kb

input:

1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 3998.

Test #41:

score: 0
Accepted
time: 9ms
memory: 3796kb

input:

1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 4389.

Test #42:

score: 0
Accepted
time: 2ms
memory: 3804kb

input:

1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 5291.

Test #43:

score: 0
Accepted
time: 0ms
memory: 4080kb

input:

1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 5292.

Test #44:

score: 0
Accepted
time: 0ms
memory: 3780kb

input:

0
0
0
0
0
1
0
0
1

output:

? right
? right
? right
? right
? flip
? left
? left
? left
! 3

result:

ok Queries used; 8.

Test #45:

score: 0
Accepted
time: 1ms
memory: 3764kb

input:

0
0
0
0
0
1
0
0
0
1

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
! 4

result:

ok Queries used; 9.

Test #46:

score: 0
Accepted
time: 1ms
memory: 3952kb

input:

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

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
! 5

result:

ok Queries used; 20.

Test #47:

score: 0
Accepted
time: 0ms
memory: 3948kb

input:

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

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
! 6

result:

ok Queries used; 21.

Test #48:

score: 0
Accepted
time: 1ms
memory: 3732kb

input:

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

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
! 7

result:

ok Queries used; 22.

Test #49:

score: 0
Accepted
time: 1ms
memory: 3956kb

input:

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

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
! 8

result:

ok Queries used; 23.

Test #50:

score: 0
Accepted
time: 1ms
memory: 3660kb

input:

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

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 42.

Test #51:

score: 0
Accepted
time: 0ms
memory: 3728kb

input:

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

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 43.

Test #52:

score: 0
Accepted
time: 2ms
memory: 3788kb

input:

0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 381.

Test #53:

score: 0
Accepted
time: 0ms
memory: 3652kb

input:

0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 627.

Test #54:

score: 0
Accepted
time: 0ms
memory: 3792kb

input:

0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 1174.

Test #55:

score: 0
Accepted
time: 0ms
memory: 3996kb

input:

0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 2843.

Test #56:

score: 0
Accepted
time: 8ms
memory: 3968kb

input:

0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 4378.

Test #57:

score: 0
Accepted
time: 0ms
memory: 3808kb

input:

0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 5281.

Test #58:

score: 0
Accepted
time: 0ms
memory: 3736kb

input:

0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 5282.

Test #59:

score: 0
Accepted
time: 1ms
memory: 3648kb

input:

0
1
0
0
1
0
0
0
0

output:

? right
? right
? right
? right
? flip
? left
? left
? left
! 3

result:

ok Queries used; 8.

Test #60:

score: 0
Accepted
time: 1ms
memory: 3780kb

input:

0
1
0
0
0
1
0
0
1
1

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
! 4

result:

ok Queries used; 9.

Test #61:

score: 0
Accepted
time: 1ms
memory: 3708kb

input:

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

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
! 5

result:

ok Queries used; 20.

Test #62:

score: 0
Accepted
time: 1ms
memory: 4064kb

input:

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

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
! 6

result:

ok Queries used; 21.

Test #63:

score: 0
Accepted
time: 0ms
memory: 3696kb

input:

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

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
! 7

result:

ok Queries used; 22.

Test #64:

score: 0
Accepted
time: 0ms
memory: 3984kb

input:

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

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
! 8

result:

ok Queries used; 23.

Test #65:

score: 0
Accepted
time: 1ms
memory: 3956kb

input:

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

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 42.

Test #66:

score: 0
Accepted
time: 2ms
memory: 3724kb

input:

1
0
1
1
1
0
1
1
0
1
0
1
1
0
0
1
0
1
1
0
1
0
1
1
0
1
0
1
1
0
1
0
1
0
0
1
0
1
1
0
1
0
1
1
0
1
0
1
1
0
1
0
1
1
1
0
0
1
0
0
1
0
0
1
1
1
1
0
1
1
1
0
0
1
0
0
1
0
0
1
1
1
0
1
0
1
1
0
1
0
1
1
0
1
0
1
1
0
1
0
0
1
0
1
1
1
1
0
0
0
1
0
0
1
0
0
1
1
0
1
1
0
0
0
1
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
1
0
0
0
1
1
0
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 411.

Test #67:

score: 0
Accepted
time: 0ms
memory: 3792kb

input:

0
0
1
0
1
0
0
1
0
0
1
0
0
1
0
1
1
0
0
1
0
0
1
0
0
1
1
1
0
1
0
0
0
1
0
0
1
0
1
1
1
0
0
1
0
0
1
0
0
1
1
0
1
0
0
0
1
1
0
1
0
0
1
1
0
0
0
1
0
0
1
1
0
0
1
0
1
1
0
0
0
1
0
1
1
0
0
1
0
0
1
0
0
1
1
1
0
1
0
0
1
0
1
1
0
1
1
0
1
0
1
1
1
1
0
1
0
0
0
0
1
1
0
1
1
1
1
1
1
0
0
1
1
0
1
0
0
1
1
1
1
1
1
0
1
1
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 668.

Test #68:

score: 0
Accepted
time: 3ms
memory: 3700kb

input:

0
0
1
1
1
0
1
1
0
0
1
1
0
1
1
0
1
0
1
1
0
0
1
1
0
1
1
0
0
1
0
0
1
0
0
0
1
0
0
1
1
0
1
1
0
0
1
1
0
1
0
1
0
0
0
1
0
1
0
1
1
0
1
0
0
1
1
0
1
0
0
1
0
1
1
0
1
0
1
0
0
0
1
0
1
0
1
1
0
0
1
1
0
1
1
0
0
1
0
0
0
0
1
1
1
0
1
1
0
0
0
1
0
0
0
1
1
0
1
1
1
0
0
0
1
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
1
0
0
0
1
1
1
0
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 826.

Test #69:

score: 0
Accepted
time: 0ms
memory: 3788kb

input:

1
1
1
1
0
1
1
1
1
1
0
1
0
0
1
0
0
0
1
0
1
1
1
1
1
1
1
1
1
1
0
1
1
0
1
0
1
1
1
1
1
1
1
1
1
1
0
1
0
0
0
1
1
1
0
1
0
1
1
1
1
0
0
1
0
1
0
1
1
0
1
0
0
1
1
1
1
0
1
0
1
1
1
0
0
0
1
0
1
1
1
1
1
1
1
1
1
1
0
1
0
0
1
0
0
1
1
0
0
1
1
0
1
1
0
0
0
0
1
0
0
1
1
0
0
1
0
1
1
1
0
1
1
0
1
0
1
1
1
0
1
0
0
1
1
0
0
1
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 1011.

Test #70:

score: 0
Accepted
time: 0ms
memory: 3988kb

input:

1
0
0
0
1
0
0
0
0
1
1
0
1
1
1
0
1
1
0
1
1
0
0
0
0
1
1
0
0
0
1
1
0
1
1
1
0
0
0
1
1
0
0
0
0
1
1
0
1
1
0
0
0
0
1
1
0
0
1
0
1
0
1
1
0
0
1
0
0
0
1
1
0
1
0
1
0
0
1
1
0
0
0
0
1
1
0
1
1
0
0
0
0
1
1
0
0
0
1
1
1
1
0
1
0
0
1
1
1
0
1
1
0
1
0
0
0
1
1
0
1
1
1
1
1
0
0
1
0
0
1
1
1
0
1
1
0
0
1
0
0
1
1
1
1
1
0
1
1
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 1340.

Test #71:

score: 0
Accepted
time: 0ms
memory: 3708kb

input:

0
0
1
1
1
0
1
1
0
0
0
1
0
0
1
0
0
0
1
0
0
0
1
1
0
0
1
0
0
0
1
1
1
0
1
1
0
0
0
1
0
0
1
1
0
0
0
1
0
0
0
1
1
1
1
1
1
0
0
0
1
1
1
1
0
1
0
1
1
0
1
1
1
1
0
0
0
1
1
1
1
1
1
0
0
0
1
0
0
0
1
1
0
0
1
0
0
0
1
1
0
0
0
1
0
0
0
1
1
0
1
0
0
1
0
1
1
1
0
1
0
1
0
1
1
1
0
1
1
0
1
0
1
0
0
1
0
1
1
0
1
1
1
0
1
0
1
0
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 1619.

Test #72:

score: 0
Accepted
time: 4ms
memory: 3732kb

input:

1
1
0
0
0
1
0
0
1
1
1
0
0
1
0
1
1
0
0
1
1
1
0
0
1
0
0
1
1
1
1
0
0
1
0
1
1
1
1
0
0
1
0
0
1
1
1
0
0
1
1
1
0
0
0
0
0
0
1
0
0
1
1
0
0
1
1
0
1
0
0
1
1
0
0
1
0
0
0
0
0
0
1
1
1
0
0
1
1
1
0
0
1
0
0
1
1
1
1
0
1
1
0
0
0
0
0
1
1
0
1
1
0
1
1
1
0
0
0
1
0
0
0
0
1
1
0
0
1
1
0
1
0
1
1
0
1
1
0
0
1
1
0
0
0
0
1
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 1931.

Test #73:

score: 0
Accepted
time: 4ms
memory: 3708kb

input:

0
1
0
1
0
1
1
0
1
0
0
0
1
1
1
0
1
1
0
0
0
1
0
1
1
0
0
0
0
1
1
0
1
0
0
1
1
0
0
0
0
1
1
0
1
0
0
0
1
1
0
0
0
0
1
1
1
1
1
0
0
1
1
0
0
0
1
0
0
0
0
1
1
0
0
1
1
1
1
1
0
0
0
0
1
1
0
0
0
1
0
1
1
0
0
0
0
1
1
0
0
1
0
0
0
0
1
0
0
1
0
1
1
0
0
1
1
0
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
0
1
1
1
0
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 2250.

Test #74:

score: 0
Accepted
time: 0ms
memory: 3804kb

input:

1
1
1
1
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
0
1
1
1
1
0
0
1
1
1
0
1
1
0
1
1
1
0
1
1
1
0
0
1
1
1
1
0
1
1
1
0
1
0
0
0
0
1
1
0
1
1
0
0
1
0
1
1
0
1
0
1
0
0
1
1
0
1
1
0
0
0
0
1
0
1
1
1
0
1
1
1
1
0
0
1
1
1
0
1
1
1
0
1
0
1
1
0
0
1
0
0
1
1
1
0
0
0
0
1
1
1
0
1
0
1
0
0
1
0
1
1
1
1
0
1
1
1
0
1
0
0
1
0
1
0
1
1
1
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 2533.

Test #75:

score: 0
Accepted
time: 0ms
memory: 3792kb

input:

0
0
1
1
1
0
1
1
0
0
1
0
0
1
1
0
1
0
0
1
0
0
1
1
0
1
0
0
1
1
1
1
0
1
1
1
1
1
0
0
1
0
1
1
0
0
1
0
0
1
0
1
1
1
1
1
0
0
1
0
1
1
1
0
0
1
0
1
1
0
0
1
1
1
0
1
0
0
1
1
1
1
1
0
1
0
0
1
0
0
1
1
0
1
0
0
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
0
0
1
0
1
0
0
1
0
0
0
0
0
0
1
0
0
0
1
1
1
1
0
1
1
1
0
0
0
1
0
0
0
0
0
0
1
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 2774.

Test #76:

score: 0
Accepted
time: 4ms
memory: 3792kb

input:

1
0
0
0
0
1
0
0
0
1
1
0
1
1
1
0
1
1
0
1
1
0
0
0
1
0
0
1
1
1
0
1
0
1
1
0
1
1
1
0
0
1
0
0
0
1
1
0
1
1
0
1
0
1
1
0
1
0
0
0
0
1
0
0
1
0
0
1
0
1
0
0
1
0
0
0
0
1
0
1
1
0
1
0
1
1
0
1
1
0
0
0
1
0
0
1
1
1
0
1
1
0
1
1
1
1
0
1
1
0
1
1
0
1
1
1
1
0
0
0
1
1
1
0
0
1
1
0
1
0
1
1
0
1
1
1
0
1
0
1
1
0
0
1
1
1
0
0
0
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 3017.

Test #77:

score: 0
Accepted
time: 6ms
memory: 3712kb

input:

0
1
1
0
1
0
0
1
1
0
0
0
0
0
0
1
0
0
0
0
0
1
1
0
0
1
0
1
1
1
0
0
1
0
0
0
1
1
1
0
1
0
0
1
1
0
0
0
0
0
1
0
1
1
1
0
0
0
0
0
1
1
1
0
0
0
0
1
0
0
0
1
1
1
0
0
0
0
0
1
1
1
0
1
0
0
0
0
0
1
1
0
0
1
0
1
1
1
0
0
0
1
1
0
0
0
1
1
1
1
1
1
1
0
1
1
0
0
0
1
0
1
1
1
1
0
1
0
1
1
1
0
1
0
0
1
1
1
0
1
0
1
1
1
1
0
1
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 3367.

Test #78:

score: 0
Accepted
time: 6ms
memory: 3996kb

input:

1
0
1
1
1
0
1
1
0
1
0
0
0
1
0
1
1
0
0
0
1
0
1
1
0
1
1
1
1
0
1
1
0
1
1
1
0
1
1
1
1
0
1
1
0
1
0
0
0
1
1
1
1
1
1
0
1
1
0
0
1
0
0
0
0
1
0
1
1
0
0
0
0
1
0
0
1
1
0
1
1
1
1
1
1
0
0
0
1
0
1
1
0
1
1
1
1
0
1
1
1
0
0
0
0
0
0
0
1
0
1
1
1
1
1
0
1
0
1
1
1
0
0
0
1
0
0
1
0
0
1
0
1
0
0
1
0
0
1
0
0
1
0
0
0
1
1
1
0
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 3486.

Test #79:

score: 0
Accepted
time: 0ms
memory: 4072kb

input:

0
1
0
0
0
1
0
0
1
0
1
0
1
0
0
1
0
1
0
1
0
1
0
0
1
0
0
0
1
1
0
1
0
1
1
0
1
1
0
0
0
1
0
0
1
0
1
0
1
0
1
1
0
1
0
1
0
0
1
1
0
0
1
1
1
0
0
1
0
1
1
1
0
0
1
1
0
0
1
0
1
0
1
1
0
1
0
1
0
1
0
0
1
0
0
0
1
1
0
1
1
1
1
1
0
1
1
1
1
1
0
1
0
1
1
1
0
1
0
1
0
0
0
1
1
1
0
0
1
1
0
0
0
1
0
0
1
1
0
0
1
1
1
0
0
0
1
0
1
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 3771.

Test #80:

score: 0
Accepted
time: 0ms
memory: 3716kb

input:

1
0
1
0
1
0
0
1
0
1
0
0
1
0
1
0
0
1
0
0
1
0
1
0
0
0
1
0
0
1
0
1
1
0
1
0
1
0
0
1
0
0
0
1
0
1
0
0
1
0
0
1
1
0
0
0
0
1
0
1
1
1
1
0
1
1
0
1
1
1
0
1
1
1
1
0
1
0
0
0
0
1
1
0
0
1
0
0
1
0
1
0
0
0
1
0
0
1
0
1
0
0
1
1
1
1
1
1
0
0
0
0
1
1
1
0
1
0
0
0
1
1
0
1
1
1
0
1
1
0
0
0
1
0
0
0
0
1
1
0
1
1
1
0
1
1
0
0
0
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 4033.

Test #81:

score: 0
Accepted
time: 4ms
memory: 3712kb

input:

0
0
1
1
0
1
1
1
0
0
0
1
0
1
0
1
1
0
1
0
0
0
1
1
1
1
0
0
1
1
1
0
0
1
0
1
1
1
0
0
1
1
1
1
0
0
0
1
0
1
1
1
0
1
1
0
1
0
1
0
0
1
1
0
1
1
1
0
1
1
0
1
1
0
0
1
0
1
0
1
1
0
1
1
1
0
1
0
0
0
1
1
1
1
0
0
1
1
1
0
1
1
0
0
1
0
0
1
1
1
0
0
1
1
0
1
0
0
1
1
0
0
0
0
1
0
1
1
0
0
0
0
0
1
0
0
0
0
1
1
0
1
0
0
0
0
1
1
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 4245.

Test #82:

score: 0
Accepted
time: 0ms
memory: 3716kb

input:

1
0
1
1
0
1
1
1
0
1
0
0
1
1
1
0
1
1
0
0
1
0
1
1
1
0
1
0
0
1
1
1
0
1
1
1
1
0
0
1
0
1
1
1
0
1
0
0
1
1
0
0
0
1
1
1
1
0
1
0
1
0
0
0
1
0
0
1
0
1
0
0
0
1
0
1
0
1
1
1
1
0
0
0
1
1
0
0
1
0
1
1
1
0
1
0
0
1
1
1
1
0
1
0
1
0
1
1
0
0
1
1
0
1
1
0
0
1
1
0
0
1
0
1
1
0
1
0
1
1
0
0
0
1
0
0
1
1
0
1
0
1
1
0
1
0
0
1
1
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 4470.

Test #83:

score: 0
Accepted
time: 12ms
memory: 4000kb

input:

1
1
1
1
0
1
1
1
1
1
0
1
1
0
1
0
0
1
1
0
1
1
1
1
1
1
0
0
1
1
0
1
1
0
1
0
1
1
0
0
1
1
1
1
1
1
0
1
1
0
0
0
1
0
1
1
1
1
0
0
1
0
0
1
1
0
0
1
0
1
1
0
0
1
0
0
1
1
1
1
0
1
0
0
0
1
1
0
1
1
1
1
1
1
0
0
1
1
0
1
0
0
1
1
0
1
1
0
0
0
0
0
1
1
0
1
0
0
0
0
1
1
1
0
0
0
0
0
1
1
0
0
0
1
0
0
1
1
0
0
0
0
0
1
1
1
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 4758.

Test #84:

score: 0
Accepted
time: 0ms
memory: 3796kb

input:

0
1
0
1
1
0
1
0
1
0
1
0
1
1
0
1
1
1
0
1
0
1
0
1
0
1
1
0
1
0
1
1
0
1
1
1
0
1
0
1
1
0
1
0
1
0
1
0
1
1
1
0
0
1
0
1
0
0
0
1
1
0
1
0
1
0
1
0
0
1
0
1
0
1
1
0
0
0
1
0
1
0
0
1
1
1
0
1
0
1
0
1
0
1
1
0
1
0
1
1
1
1
1
0
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
1
0
0
1
0
0
1
1
0
1
0
1
0
0
1
0
1
1
0
0
1
0
0
1
0
0
1
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 4946.

Test #85:

score: 0
Accepted
time: 0ms
memory: 3808kb

input:

0
0
0
0
0
1
0
0
0
0
1
0
1
0
0
1
0
1
0
1
0
0
0
0
1
1
0
0
1
1
0
0
0
1
0
0
1
1
0
0
1
1
0
0
0
0
1
0
1
0
1
1
1
1
0
1
1
1
0
0
0
1
1
1
0
1
0
1
1
0
1
1
1
0
0
0
1
1
1
0
1
1
1
1
0
1
0
1
0
0
0
0
1
1
0
0
1
1
0
0
1
1
1
1
1
1
1
0
0
0
0
1
0
1
1
0
0
1
1
1
0
0
0
1
0
1
1
0
0
0
1
1
0
1
1
1
0
0
0
1
1
0
1
0
0
0
1
1
1
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 5121.

Test #86:

score: 0
Accepted
time: 3ms
memory: 3972kb

input:

1
1
0
0
0
1
0
0
1
1
1
1
0
0
1
0
0
0
1
1
1
1
0
0
1
1
1
1
0
0
1
1
0
1
1
1
0
0
1
1
1
1
0
0
1
1
1
1
0
0
0
0
0
1
1
0
0
0
0
1
0
1
0
0
0
0
1
0
0
0
0
0
1
0
1
0
0
0
0
1
1
0
0
0
0
0
1
1
1
1
0
0
1
1
1
1
0
0
1
1
1
0
1
1
1
0
1
1
0
1
1
1
1
1
0
0
1
0
1
1
1
1
0
0
0
0
1
0
0
1
0
0
1
0
0
0
1
0
0
1
0
0
0
0
1
1
1
1
0
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 5286.

Test #87:

score: 0
Accepted
time: 10ms
memory: 3652kb

input:

1
0
0
1
1
0
1
0
0
1
0
0
0
1
1
0
1
0
0
0
1
0
0
1
0
0
0
0
1
0
0
1
0
1
1
0
0
1
0
0
0
0
1
0
0
1
0
0
0
1
0
0
0
1
0
0
1
0
0
1
0
1
1
0
0
1
1
0
1
0
0
1
1
0
1
0
0
1
0
0
1
0
0
0
1
0
0
0
1
0
0
1
0
0
0
0
1
0
0
1
1
0
0
0
0
1
1
0
1
1
0
1
1
0
0
0
1
0
1
0
1
1
1
0
1
0
0
0
1
1
0
0
1
0
0
0
1
1
0
0
0
1
0
1
1
1
0
1
0
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 5284.

Test #88:

score: 0
Accepted
time: 1ms
memory: 3792kb

input:

1
1
0
1
1
0
1
0
0

output:

? right
? right
? right
? right
? flip
? left
? left
? left
! 3

result:

ok Queries used; 8.

Test #89:

score: 0
Accepted
time: 0ms
memory: 3700kb

input:

1
1
0
1
1
0
1
0
1
0

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
! 4

result:

ok Queries used; 9.

Test #90:

score: 0
Accepted
time: 1ms
memory: 3720kb

input:

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

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
! 5

result:

ok Queries used; 20.

Test #91:

score: 0
Accepted
time: 1ms
memory: 3984kb

input:

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

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
! 6

result:

ok Queries used; 21.

Test #92:

score: 0
Accepted
time: 1ms
memory: 3724kb

input:

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

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
! 7

result:

ok Queries used; 22.

Test #93:

score: 0
Accepted
time: 1ms
memory: 3700kb

input:

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

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
! 8

result:

ok Queries used; 23.

Test #94:

score: 0
Accepted
time: 1ms
memory: 3984kb

input:

1
1
1
0
0
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
0
1
1
1
0
1
0
0
1
1
1
0
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
0
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
0
1
1
1
0
0
1
1
0
1
1
1
1
1
1
1
0
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
0
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 171.

Test #95:

score: 0
Accepted
time: 2ms
memory: 3768kb

input:

1
1
0
1
1
0
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
0
1
1
0
1
1
1
1
1
0
1
1
1
1
0
1
1
0
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
0
1
1
1
0
1
1
0
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
0
1
1
0
1
1
1
1
0
1
0
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 408.

Test #96:

score: 0
Accepted
time: 3ms
memory: 3980kb

input:

1
1
1
0
1
0
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
0
1
1
1
1
1
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 531.

Test #97:

score: 0
Accepted
time: 4ms
memory: 3784kb

input:

1
1
0
1
1
0
1
0
1
1
1
1
1
0
1
0
0
1
1
1
1
1
0
1
0
0
1
1
0
0
1
1
1
0
1
1
0
0
1
1
0
0
1
0
1
1
1
1
1
0
0
0
1
1
0
1
1
1
1
1
0
1
0
1
1
0
1
0
0
1
1
0
1
0
1
1
1
1
1
0
1
1
0
0
0
1
1
1
1
1
0
1
0
0
1
1
0
0
1
1
0
0
1
1
0
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
0
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 679.

Test #98:

score: 0
Accepted
time: 4ms
memory: 3724kb

input:

1
1
0
1
1
0
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
0
1
1
1
1
1
1
0
1
0
0
1
1
1
1
1
1
0
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
0
1
1
1
1
1
1
0
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 752.

Test #99:

score: 0
Accepted
time: 2ms
memory: 3696kb

input:

1
1
1
0
1
0
0
1
1
1
0
1
0
1
1
0
1
0
1
0
1
1
1
0
0
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
0
0
1
1
1
0
1
0
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
0
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
0
1
0
1
1
1
0
0
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
0
1
1
1
1
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 798.

Test #100:

score: 0
Accepted
time: 0ms
memory: 3688kb

input:

1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
0
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
0
1
1
1
1
1
0
1
0
1
1
0
1
1
1
1
1
0
0
1
1
1
1
1
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 859.

Test #101:

score: 0
Accepted
time: 0ms
memory: 3984kb

input:

1
1
1
0
1
0
0
1
1
1
1
0
0
1
0
1
1
0
0
1
1
1
1
0
0
1
0
1
1
0
1
1
1
0
1
1
0
1
1
0
1
0
0
1
1
1
1
0
0
1
1
1
1
1
1
1
1
1
1
1
0
0
0
1
1
0
0
1
0
1
1
0
0
0
1
1
1
1
1
1
1
1
1
1
1
0
0
1
1
1
1
0
0
1
0
1
1
0
1
1
0
1
0
1
0
1
1
1
1
1
1
1
1
1
1
0
1
0
1
1
1
1
1
1
1
0
1
1
0
1
1
1
0
1
1
1
1
0
1
1
0
1
1
1
1
1
1
1
0
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 1077.

Test #102:

score: 0
Accepted
time: 0ms
memory: 3780kb

input:

1
1
1
1
1
0
1
1
1
1
0
0
1
1
1
0
1
1
0
0
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
0
0
1
1
0
0
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
0
0
1
1
0
0
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 1122.

Test #103:

score: 0
Accepted
time: 3ms
memory: 3768kb

input:

1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
0
1
1
1
1
1
0
1
1
1
1
0
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
0
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
0
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
0
0
1
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 1221.

Test #104:

score: 0
Accepted
time: 0ms
memory: 3660kb

input:

1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
0
1
1
1
1
1
0
1
0
0
1
1
1
1
1
0
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
0
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
0
1
1
1
1
1
0
0
1
1
1
0
1
1
0
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 1381.

Test #105:

score: 0
Accepted
time: 4ms
memory: 3800kb

input:

1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
0
1
1
0
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
0
1
1
0
1
0
1
1
1
1
1
0
1
1
1
1
1
1
1
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 1427.

Test #106:

score: 0
Accepted
time: 9ms
memory: 3692kb

input:

0
1
0
1
1
0
1
0
1
0
1
1
1
1
1
0
1
1
1
1
0
1
0
1
0
1
1
1
1
1
0
1
1
0
1
0
1
1
1
1
1
0
1
0
1
0
1
1
1
1
0
1
1
1
1
1
0
1
1
1
0
0
1
1
1
1
1
0
1
1
1
1
0
0
1
1
1
0
1
1
1
1
1
0
1
1
1
1
0
1
0
1
0
1
1
1
1
1
0
1
0
1
1
1
1
1
1
1
1
1
0
0
1
1
1
1
1
1
1
1
0
1
0
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
0
1
1
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 1551.

Test #107:

score: 0
Accepted
time: 0ms
memory: 3656kb

input:

1
0
1
0
1
0
0
1
0
1
1
1
1
1
0
1
1
1
1
1
1
0
1
0
0
1
1
1
0
1
0
1
1
0
1
0
1
0
1
1
1
0
0
1
0
1
1
1
1
1
1
1
0
1
0
0
1
1
1
1
1
1
1
0
0
1
1
0
1
0
0
1
1
1
1
1
1
1
0
0
1
0
1
1
1
1
1
1
1
0
1
0
0
1
1
1
0
1
0
1
0
1
1
0
0
0
1
1
1
1
0
0
0
1
1
0
1
0
0
0
1
1
1
0
0
1
1
0
1
1
1
1
1
0
1
1
1
1
0
1
1
0
0
1
1
1
0
0
0
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 1578.

Test #108:

score: 0
Accepted
time: 2ms
memory: 3732kb

input:

1
1
1
0
1
0
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
0
1
1
1
0
1
0
1
1
0
1
0
1
0
1
1
1
0
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
0
1
1
0
1
1
1
0
1
1
0
1
1
0
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
0
1
1
1
0
1
0
1
0
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
0
1
1
1
1
1
1
1
1
0
0
1
0
1
0
0
1
0
0
1
1
1
1
1
1
1
1
0
0
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 1732.

Test #109:

score: 0
Accepted
time: 0ms
memory: 3704kb

input:

1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
0
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
0
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 1784.

Test #110:

score: 0
Accepted
time: 4ms
memory: 3700kb

input:

1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
0
1
1
1
1
1
1
0
1
1
1
1
1
0
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
0
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 1941.

Test #111:

score: 0
Accepted
time: 8ms
memory: 3984kb

input:

1
1
1
1
1
0
1
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
1
0
0
1
1
0
1
1
1
1
0
1
1
1
0
1
1
0
0
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
0
0
1
1
0
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 2012.

Test #112:

score: 0
Accepted
time: 0ms
memory: 3724kb

input:

1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
0
0
1
1
1
1
1
1
0
1
1
1
1
1
0
0
0
1
1
1
1
1
1
1
1
0
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
0
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
0
1
1
1
1
1
1
1
1
0
0
0
1
1
1
1
1
0
1
0
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
0
1
0
1
1
1
0
1
1
1
1
0
1
1
0
1
0
1
1
1
1
0
1
1
1
0
1
0
1
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 2143.

Test #113:

score: 0
Accepted
time: 0ms
memory: 3712kb

input:

1
1
0
1
1
0
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
0
1
1
0
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 2265.

Test #114:

score: 0
Accepted
time: 7ms
memory: 3768kb

input:

1
1
1
1
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
0
1
1
1
0
1
1
1
1
1
0
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
0
1
1
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
0
1
1
1
1
0
1
0
1
0
0
1
1
1
0
1
1
0
1
1
1
1
0
1
1
1
0
1
1
0
1
1
1
0
0
1
0
1
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 2407.

Test #115:

score: 0
Accepted
time: 3ms
memory: 3800kb

input:

1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
0
1
1
1
0
1
1
1
1
1
1
1
0
0
0
0
1
1
0
0
1
1
1
1
1
1
0
0
0
1
1
0
1
0
0
0
1
1
1
1
1
1
0
0
1
1
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 2408.

Test #116:

score: 0
Accepted
time: 7ms
memory: 3704kb

input:

1
1
0
1
1
0
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
0
1
1
1
1
1
1
0
1
0
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
0
1
0
1
0
1
1
1
1
1
1
0
1
0
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
0
1
1
1
0
0
0
1
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
0
1
0
1
1
1
1
0
1
1
1
0
1
1
1
1
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 2481.

Test #117:

score: 0
Accepted
time: 0ms
memory: 3712kb

input:

0
1
1
1
1
0
1
1
1
0
0
1
1
1
1
0
1
1
1
0
0
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
0
0
1
1
1
0
0
1
1
1
1
1
1
1
1
0
1
0
1
0
1
1
0
1
0
1
0
1
0
1
1
1
1
1
1
1
1
0
0
1
1
1
0
0
1
1
1
0
1
1
1
1
1
1
1
0
1
0
1
1
0
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
0
1
1
1
0
1
1
1
0
1
0
1
1
0
1
1
1
0
1
1
1
0
1
1
1
0
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 2640.

Test #118:

score: 0
Accepted
time: 16ms
memory: 3704kb

input:

1
0
1
0
1
0
0
1
0
1
0
0
1
1
1
0
1
1
0
0
1
0
1
0
0
1
0
0
1
1
1
1
1
0
1
1
1
1
0
0
1
0
0
1
0
1
0
0
1
1
0
0
1
1
1
1
0
1
1
1
1
0
1
1
0
1
1
0
1
0
1
1
0
1
1
1
1
0
1
1
1
1
0
0
1
1
0
0
1
0
1
0
0
1
0
0
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
0
1
1
0
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 2781.

Test #119:

score: 0
Accepted
time: 3ms
memory: 3964kb

input:

1
0
1
1
1
0
1
1
0
1
0
1
1
1
0
1
1
1
1
0
1
0
1
1
0
0
0
1
0
0
1
1
0
1
1
1
0
0
1
0
0
0
1
1
0
1
0
1
1
1
1
1
1
1
0
1
1
1
1
0
1
1
0
1
1
1
1
0
1
1
1
0
1
1
0
1
1
1
1
0
1
1
1
1
1
1
1
0
1
0
1
1
0
0
0
1
0
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
0
1
1
0
1
0
1
1
1
1
1
1
1
1
0
1
1
1
0
1
1
0
1
1
1
1
1
1
1
1
0
1
0
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 2888.

Test #120:

score: 0
Accepted
time: 4ms
memory: 3800kb

input:

1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
0
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
0
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
0
1
1
1
1
0
1
1
1
0
1
1
0
1
1
1
1
1
1
1
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 2958.

Test #121:

score: 0
Accepted
time: 4ms
memory: 3736kb

input:

1
1
1
1
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
0
1
1
1
1
0
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
0
1
1
1
1
0
1
1
1
0
1
1
0
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
0
1
0
1
1
0
1
1
1
0
1
1
1
1
0
0
1
1
1
1
1
1
0
1
0
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 3113.

Test #122:

score: 0
Accepted
time: 0ms
memory: 3704kb

input:

1
1
1
1
1
0
1
1
1
1
1
0
1
0
1
0
0
1
0
1
1
1
1
1
0
0
1
1
1
0
1
1
0
1
1
1
0
1
1
1
0
0
1
1
1
1
1
0
1
0
0
1
1
0
1
1
1
1
1
1
0
1
1
0
1
1
1
0
1
1
0
1
1
0
1
1
1
1
1
1
0
1
1
0
0
1
0
1
1
1
1
1
0
0
1
1
1
0
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
0
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 3176.

Test #123:

score: 0
Accepted
time: 0ms
memory: 3796kb

input:

1
0
1
0
1
0
0
1
0
1
1
1
1
1
1
0
1
1
1
1
1
0
1
0
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
0
1
0
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
0
1
0
0
1
1
1
1
1
1
1
0
1
0
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
0
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 3173.

Test #124:

score: 0
Accepted
time: 2ms
memory: 3708kb

input:

1
0
1
1
0
1
1
1
0
1
1
0
0
0
0
1
0
0
0
1
1
0
1
1
1
0
1
0
0
0
1
1
1
0
1
1
0
0
0
1
0
1
1
1
0
1
1
0
0
0
1
0
1
0
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
0
1
0
1
0
0
0
1
1
0
1
1
1
0
1
0
0
0
1
1
0
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
0
1
1
1
1
1
1
1
0
0
1
1
0
1
0
0
1
1
1
1
1
1
1
0
1
1
0
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 3330.

Test #125:

score: 0
Accepted
time: 5ms
memory: 3804kb

input:

1
0
1
1
0
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
0
0
1
1
0
1
1
1
0
0
1
1
1
1
1
1
0
1
1
1
1
1
0
0
1
0
1
1
1
1
1
0
1
0
1
1
1
1
1
0
1
1
1
1
0
1
0
1
1
1
1
1
0
1
0
0
1
1
1
1
1
0
1
1
1
1
1
1
0
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 3436.

Test #126:

score: 0
Accepted
time: 0ms
memory: 3708kb

input:

1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
0
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
0
1
1
1
1
1
1
1
0
1
1
0
1
1
1
1
1
0
1
1
1
1
0
1
1
0
1
1
1
1
1
1
1
0
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
0
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 3580.

Test #127:

score: 0
Accepted
time: 14ms
memory: 3716kb

input:

0
1
1
0
1
0
0
1
1
0
1
1
1
1
1
0
1
1
1
1
0
1
1
0
0
1
1
0
0
1
1
1
1
0
1
1
1
0
0
1
1
0
0
1
1
0
1
1
1
1
0
1
1
1
1
1
0
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
0
1
1
1
1
1
0
1
1
1
1
0
1
1
0
0
1
1
0
0
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
1
1
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 3675.

Test #128:

score: 0
Accepted
time: 4ms
memory: 3996kb

input:

1
0
0
1
1
0
1
0
0
1
1
1
1
1
1
0
1
1
1
1
1
0
0
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
0
0
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
0
0
1
0
1
1
1
1
1
1
1
0
1
1
0
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
0
1
1
1
1
0
1
0
1
0
0
1
0
1
1
1
1
0
1
1
1
0
1
1
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 3781.

Test #129:

score: 0
Accepted
time: 3ms
memory: 3804kb

input:

0
0
0
1
1
0
1
0
0
0
1
1
1
0
1
0
0
1
1
1
0
0
0
1
0
1
1
1
1
1
0
1
0
1
1
0
1
1
1
1
1
0
1
0
0
0
1
1
1
0
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
0
1
1
1
0
0
0
1
0
1
1
1
1
1
0
1
1
1
0
1
1
1
0
1
0
1
1
1
1
0
1
1
1
1
1
0
1
1
0
1
1
1
1
1
0
0
1
1
1
0
1
1
0
0
1
1
1
1
1
0
1
1
0
1
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 3892.

Test #130:

score: 0
Accepted
time: 10ms
memory: 3716kb

input:

1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 3901.

Test #131:

score: 0
Accepted
time: 6ms
memory: 3780kb

input:

1
1
0
1
1
0
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
0
1
1
1
1
1
1
0
1
1
1
1
1
0
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
0
1
1
1
1
1
1
1
0
1
1
1
0
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
0
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 4055.

Test #132:

score: 0
Accepted
time: 0ms
memory: 3804kb

input:

1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
0
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
0
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
0
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
0
0
1
0
1
1
1
1
0
1
1
1
0
1
0
0
1
1
1
1
1
0
1
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 4091.

Test #133:

score: 0
Accepted
time: 0ms
memory: 3696kb

input:

1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
0
1
1
0
1
0
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
0
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
0
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
0
1
0
0
1
1
0
1
1
1
0
0
1
0
1
0
1
1
1
1
1
1
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 4283.

Test #134:

score: 0
Accepted
time: 0ms
memory: 4076kb

input:

1
1
0
1
1
0
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
0
1
1
1
1
1
1
0
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
0
1
1
1
1
1
1
0
1
0
1
1
1
1
1
1
1
0
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 4330.

Test #135:

score: 0
Accepted
time: 9ms
memory: 3808kb

input:

1
0
0
1
1
0
1
0
0
1
1
1
0
1
1
0
1
0
1
1
1
0
0
1
0
1
1
1
1
1
1
0
1
0
0
1
1
1
1
1
1
0
1
0
0
1
1
1
0
1
0
0
1
1
1
1
1
1
1
1
1
1
0
1
0
1
1
0
1
0
1
0
1
1
1
1
1
1
1
1
1
1
0
0
1
0
1
1
1
0
0
1
0
1
1
1
1
1
1
0
0
1
1
1
1
1
1
1
1
1
1
1
0
1
0
1
1
1
1
1
1
1
0
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
0
1
1
1
1
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 4438.

Test #136:

score: 0
Accepted
time: 0ms
memory: 3796kb

input:

1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
0
1
1
0
1
0
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
0
1
1
0
1
0
1
1
1
1
1
0
1
0
0
1
1
1
1
1
0
1
0
1
1
0
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
0
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
0
1
1
1
1
1
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 4594.

Test #137:

score: 0
Accepted
time: 2ms
memory: 3672kb

input:

1
1
0
1
1
0
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
0
1
1
0
1
1
1
1
1
0
1
1
1
1
0
1
1
0
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
0
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
0
1
1
0
1
1
1
1
0
1
0
1
1
0
1
1
0
1
0
1
0
1
1
1
0
1
1
1
0
1
1
1
0
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
0
1
1
1
0
1
1
1
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 4631.

Test #138:

score: 0
Accepted
time: 0ms
memory: 3748kb

input:

1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
0
1
0
1
1
1
1
1
0
1
1
1
1
0
1
0
0
1
1
1
1
1
1
1
1
0
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
0
1
1
1
1
1
1
1
1
0
0
1
0
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 4736.

Test #139:

score: 0
Accepted
time: 2ms
memory: 3780kb

input:

0
1
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
1
1
1
0
1
0
1
1
1
1
1
1
0
1
1
1
1
1
0
1
0
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
0
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
0
1
0
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 4876.

Test #140:

score: 0
Accepted
time: 4ms
memory: 3688kb

input:

1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
0
1
1
1
1
1
1
1
1
0
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
0
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 4906.

Test #141:

score: 0
Accepted
time: 3ms
memory: 3712kb

input:

1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
0
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
0
0
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
0
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 5067.

Test #142:

score: 0
Accepted
time: 0ms
memory: 3780kb

input:

0
1
1
1
1
0
1
1
1
0
1
1
1
1
1
0
1
1
1
1
0
1
1
1
0
1
1
1
0
1
1
0
0
1
0
1
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
0
1
1
1
0
1
1
0
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
0
1
1
1
0
1
1
1
0
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 5148.

Test #143:

score: 0
Accepted
time: 0ms
memory: 3716kb

input:

1
1
1
0
1
0
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
0
0
0
1
0
0
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 5280.

Test #144:

score: 0
Accepted
time: 9ms
memory: 3780kb

input:

1
1
1
1
0
1
1
1
1
1
1
0
0
0
1
0
0
0
0
1
1
1
1
1
1
1
1
0
1
1
1
0
1
0
0
1
1
1
0
1
1
1
1
1
1
1
1
0
0
0
0
1
0
0
1
1
0
1
1
1
0
0
0
1
0
0
1
0
0
0
1
0
0
0
1
1
1
0
1
1
0
0
1
0
0
0
0
1
1
1
1
1
1
1
1
0
1
1
1
0
0
1
0
0
0
0
0
0
1
1
1
1
1
0
1
0
0
0
0
0
1
0
1
0
1
1
1
1
1
1
0
0
1
0
0
0
1
1
1
1
1
1
0
1
0
1
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 5281.

Test #145:

score: 0
Accepted
time: 0ms
memory: 4076kb

input:

1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
0
1
1
1
1
1
1
0
1
1
1
1
1
0
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 5294.

Test #146:

score: 0
Accepted
time: 1ms
memory: 3784kb

input:

1
0
1
1
0
1
1
1
1

output:

? right
? right
? right
? right
? flip
? left
? left
? left
! 3

result:

ok Queries used; 8.

Test #147:

score: 0
Accepted
time: 1ms
memory: 3768kb

input:

0
1
1
0
0
1
0
1
1
1

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
! 4

result:

ok Queries used; 9.

Test #148:

score: 0
Accepted
time: 1ms
memory: 3792kb

input:

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

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
! 5

result:

ok Queries used; 20.

Test #149:

score: 0
Accepted
time: 1ms
memory: 3788kb

input:

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

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
! 6

result:

ok Queries used; 21.

Test #150:

score: 0
Accepted
time: 1ms
memory: 3700kb

input:

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

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
! 7

result:

ok Queries used; 22.

Test #151:

score: 0
Accepted
time: 1ms
memory: 3732kb

input:

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

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
! 8

result:

ok Queries used; 23.

Test #152:

score: 0
Accepted
time: 1ms
memory: 3656kb

input:

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

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 42.

Test #153:

score: 0
Accepted
time: 1ms
memory: 3728kb

input:

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

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 43.

Test #154:

score: 0
Accepted
time: 2ms
memory: 3792kb

input:

0
0
0
0
0
1
0
0
0
0
1
0
0
1
0
1
1
0
0
1
0
0
0
0
1
0
1
1
1
1
1
0
0
1
0
1
1
1
1
1
0
1
0
0
0
0
1
0
0
1
1
0
0
0
0
1
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
1
0
0
0
0
1
1
0
0
1
0
0
0
0
1
0
1
1
1
1
1
0
1
1
0
1
0
1
0
0
0
1
1
0
1
0
0
1
1
1
1
0
0
0
0
0
0
1
0
0
0
0
1
0
1
0
0
1
0
0
0
0
1
0
0
0
0
0
0
1
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 352.

Test #155:

score: 0
Accepted
time: 3ms
memory: 3756kb

input:

0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 452.

Test #156:

score: 0
Accepted
time: 3ms
memory: 3796kb

input:

0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
1
0
0
1
0
0
0
0
1
0
0
0
1
0
0
1
0
1
0
0
0
0
0
0
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 592.

Test #157:

score: 0
Accepted
time: 0ms
memory: 3984kb

input:

0
1
0
0
0
1
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 605.

Test #158:

score: 0
Accepted
time: 0ms
memory: 4064kb

input:

0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 727.

Test #159:

score: 0
Accepted
time: 0ms
memory: 3652kb

input:

0
0
1
0
0
1
0
1
0
0
0
0
0
1
1
0
1
0
0
0
0
0
1
0
1
0
0
0
0
0
0
1
0
1
1
0
0
0
0
0
0
1
0
1
0
0
0
0
0
1
0
0
0
1
0
0
1
0
1
0
0
1
0
1
0
0
0
1
0
0
1
0
1
0
0
1
0
1
0
0
1
0
0
0
1
0
0
0
0
0
1
0
1
0
0
0
0
0
0
1
1
0
1
0
0
0
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
1
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 880.

Test #160:

score: 0
Accepted
time: 3ms
memory: 3696kb

input:

0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
1
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
1
0
0
0
0
0
1
0
1
0
0
0
0
0
0
1
0
0
0
0
0
1
0
1
0
0
0
0
0
1
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 884.

Test #161:

score: 0
Accepted
time: 0ms
memory: 3988kb

input:

0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 1069.

Test #162:

score: 0
Accepted
time: 7ms
memory: 3776kb

input:

0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
1
0
0
1
0
0
0
0
1
0
0
0
0
0
1
0
0
1
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
1
0
1
0
0
1
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
1
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 1159.

Test #163:

score: 0
Accepted
time: 7ms
memory: 3704kb

input:

0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
1
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
1
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 1262.

Test #164:

score: 0
Accepted
time: 0ms
memory: 3700kb

input:

0
1
0
0
1
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
1
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 1342.

Test #165:

score: 0
Accepted
time: 0ms
memory: 3768kb

input:

1
0
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
1
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
1
1
1
1
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
1
0
1
0
1
0
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
1
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
1
0
0
0
0
1
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 1396.

Test #166:

score: 0
Accepted
time: 6ms
memory: 3988kb

input:

0
0
0
1
0
1
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
1
1
0
0
1
1
0
0
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 1532.

Test #167:

score: 0
Accepted
time: 0ms
memory: 3788kb

input:

0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
1
0
0
0
0
1
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 1661.

Test #168:

score: 0
Accepted
time: 9ms
memory: 3748kb

input:

0
1
0
0
1
0
0
0
1
0
1
1
0
0
1
0
0
0
1
1
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
1
1
0
0
0
0
0
1
0
0
0
0
0
0
1
0
1
0
0
0
0
1
0
0
0
1
0
1
0
0
0
0
0
0
1
0
0
0
0
0
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
1
0
0
0
0
1
1
1
0
0
0
0
0
0
0
1
0
0
0
1
0
0
1
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
1
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 1699.

Test #169:

score: 0
Accepted
time: 0ms
memory: 3988kb

input:

0
0
1
0
0
1
0
1
0
0
0
0
1
1
0
1
1
1
0
0
0
0
1
0
1
0
1
0
1
0
1
0
0
1
0
1
0
1
0
1
0
1
0
1
0
0
0
0
1
1
1
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
1
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
1
1
1
0
0
0
0
1
0
1
0
1
0
1
0
1
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
1
0
0
0
0
1
0
1
0
0
0
0
0
0
1
0
0
0
0
0
1
0
1
0
0
0
0
1
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 1804.

Test #170:

score: 0
Accepted
time: 0ms
memory: 3700kb

input:

0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
1
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
1
1
0
1
1
0
0
0
0
0
0
1
0
0
0
1
0
0
1
0
0
0
0
0
0
1
1
0
1
1
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
1
1
0
1
0
0
0
0
1
0
1
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
1
0
0
1
0
0
0
1
0
0
1
0
0
1
0
0
0
0
1
0
0
0
1
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 1935.

Test #171:

score: 0
Accepted
time: 0ms
memory: 3784kb

input:

0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
0
0
0
0
1
0
0
1
0
1
0
0
0
0
1
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
1
1
1
0
0
0
0
0
1
0
0
0
0
0
0
1
1
1
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
0
0
0
0
1
0
1
0
0
1
0
0
1
0
0
1
1
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 2036.

Test #172:

score: 0
Accepted
time: 0ms
memory: 3724kb

input:

0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
1
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
1
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
1
0
0
1
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 2079.

Test #173:

score: 0
Accepted
time: 0ms
memory: 3960kb

input:

1
1
0
1
0
1
1
0
1
1
0
0
0
0
0
1
0
0
0
0
1
1
0
1
1
0
0
1
0
0
0
1
0
1
1
0
0
0
1
0
0
1
1
0
1
1
0
0
0
0
1
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
0
0
0
0
1
1
0
1
1
0
0
1
0
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
1
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 2227.

Test #174:

score: 0
Accepted
time: 3ms
memory: 3824kb

input:

0
0
0
0
0
1
0
0
0
0
0
0
1
1
0
1
1
1
0
0
0
0
0
0
1
1
1
0
1
0
0
0
0
1
0
0
0
1
0
1
1
1
0
0
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
1
1
1
0
0
0
0
0
0
1
1
1
0
1
0
0
0
1
0
0
1
0
1
1
1
0
0
1
1
0
0
1
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
1
0
1
1
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 2338.

Test #175:

score: 0
Accepted
time: 0ms
memory: 3768kb

input:

0
0
1
0
0
1
0
1
0
0
0
0
0
1
0
1
1
0
0
0
0
0
1
0
1
0
1
0
0
0
0
0
0
1
0
0
0
0
0
1
0
1
0
1
0
0
0
0
0
1
1
0
0
0
0
0
1
1
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
1
1
0
0
0
0
0
1
1
0
0
0
0
0
1
0
1
0
1
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 2454.

Test #176:

score: 0
Accepted
time: 5ms
memory: 3796kb

input:

0
1
0
0
1
0
0
0
1
0
0
1
0
0
1
0
0
0
1
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
1
0
0
0
1
0
0
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
1
0
0
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 2502.

Test #177:

score: 0
Accepted
time: 3ms
memory: 3708kb

input:

0
0
0
1
0
1
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
0
0
1
0
1
0
0
1
0
0
0
1
0
1
0
0
1
1
0
0
0
0
0
0
0
1
1
0
0
0
0
0
1
1
0
1
0
0
0
0
0
1
0
0
0
0
0
0
1
0
1
1
0
0
0
0
0
1
1
0
0
0
0
0
0
0
1
1
0
0
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 2626.

Test #178:

score: 0
Accepted
time: 8ms
memory: 3712kb

input:

0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 2794.

Test #179:

score: 0
Accepted
time: 0ms
memory: 3704kb

input:

0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
1
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
1
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
1
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
1
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
1
0
0
0
1
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 2805.

Test #180:

score: 0
Accepted
time: 5ms
memory: 3708kb

input:

0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
1
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
1
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 2912.

Test #181:

score: 0
Accepted
time: 0ms
memory: 3708kb

input:

0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
1
0
0
0
1
0
0
1
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 3003.

Test #182:

score: 0
Accepted
time: 2ms
memory: 3708kb

input:

0
0
0
0
0
1
0
0
0
0
1
0
0
0
0
1
0
0
0
1
0
0
0
0
1
0
0
0
0
0
0
1
0
1
1
0
0
0
0
0
0
1
0
0
0
0
1
0
0
0
1
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
1
0
0
0
1
0
0
0
0
1
0
0
0
0
0
0
1
1
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 3158.

Test #183:

score: 0
Accepted
time: 9ms
memory: 3796kb

input:

0
0
1
0
0
1
0
1
0
0
0
0
1
0
0
1
0
1
0
0
0
0
1
0
1
0
0
0
0
1
0
0
0
1
0
0
1
0
0
0
0
1
0
1
0
0
0
0
1
0
1
0
0
0
1
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
1
0
0
0
1
0
1
0
0
0
0
1
0
1
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
1
1
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
1
1
0
0
0
0
0
1
0
0
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 3230.

Test #184:

score: 0
Accepted
time: 3ms
memory: 4068kb

input:

1
1
1
0
0
1
0
1
1
1
0
0
0
0
0
1
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
1
1
1
0
0
0
0
1
0
0
1
0
0
1
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
1
0
0
1
0
0
1
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
1
0
0
0
0
0
0
1
0
0
0
0
1
1
0
0
0
0
0
0
0
1
0
0
0
1
0
0
1
0
0
0
0
0
0
0
1
1
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 3305.

Test #185:

score: 0
Accepted
time: 0ms
memory: 3796kb

input:

0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
1
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
1
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
1
0
0
0
1
0
0
1
0
0
0
0
1
0
0
0
0
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 3494.

Test #186:

score: 0
Accepted
time: 0ms
memory: 3804kb

input:

0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
1
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
1
1
0
1
0
1
0
0
0
0
0
0
1
0
0
0
0
0
1
0
1
0
1
1
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
1
0
1
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 3537.

Test #187:

score: 0
Accepted
time: 0ms
memory: 3744kb

input:

0
1
0
0
0
1
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
1
0
1
0
0
0
0
0
1
0
0
0
0
0
0
1
0
1
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 3686.

Test #188:

score: 0
Accepted
time: 0ms
memory: 3800kb

input:

0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
1
1
0
0
0
0
0
0
0
1
0
1
0
0
0
0
0
0
1
0
0
0
0
0
1
0
1
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
1
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 3791.

Test #189:

score: 0
Accepted
time: 2ms
memory: 3780kb

input:

1
0
0
0
0
1
0
0
0
1
0
1
1
0
0
1
0
1
1
0
1
0
0
0
1
1
1
1
0
0
1
1
1
0
1
1
0
0
1
1
1
1
0
0
0
1
0
1
1
0
1
1
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
1
0
0
1
0
0
0
0
0
0
1
0
0
0
0
1
1
0
1
1
0
1
0
0
0
1
1
1
1
0
0
1
1
0
0
0
0
0
1
1
1
0
1
0
0
1
1
0
0
1
0
1
0
1
0
1
1
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
1
1
0
1
0
1
0
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 3844.

Test #190:

score: 0
Accepted
time: 9ms
memory: 3712kb

input:

0
0
0
0
1
0
0
0
0
0
1
0
1
0
0
1
0
1
0
1
0
0
0
0
0
0
0
1
0
0
1
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
1
0
1
0
1
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
1
0
1
0
1
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
1
1
1
0
1
1
0
0
1
1
0
0
0
1
0
0
0
1
0
0
0
1
1
0
0
0
1
1
0
1
0
0
0
1
1
0
0
0
1
0
0
0
1
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 3910.

Test #191:

score: 0
Accepted
time: 0ms
memory: 3808kb

input:

1
0
0
0
0
1
0
0
0
1
0
0
0
1
0
1
1
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
1
1
1
0
0
0
0
0
0
0
0
1
0
1
1
0
0
0
1
0
0
1
1
0
1
0
0
0
0
0
0
0
0
1
1
1
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
1
1
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 3998.

Test #192:

score: 0
Accepted
time: 0ms
memory: 3664kb

input:

1
0
0
0
0
1
0
0
0
1
0
0
0
0
0
1
0
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
0
0
0
1
0
0
0
1
0
0
0
1
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 4131.

Test #193:

score: 0
Accepted
time: 12ms
memory: 3712kb

input:

0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
1
0
1
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 4178.

Test #194:

score: 0
Accepted
time: 0ms
memory: 3736kb

input:

0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
1
0
1
0
0
0
0
0
0
1
0
1
0
1
0
0
1
0
1
1
0
0
1
0
1
0
1
0
0
0
0
0
0
1
0
1
0
0
1
1
1
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
1
1
1
0
0
1
0
1
0
0
0
0
0
0
1
0
1
0
1
0
0
1
1
0
0
0
1
1
0
0
0
1
0
0
0
0
1
0
1
0
1
0
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
1
0
1
0
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 4370.

Test #195:

score: 0
Accepted
time: 10ms
memory: 3712kb

input:

0
0
0
1
0
1
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
0
0
1
0
0
1
0
0
1
0
1
0
0
1
0
0
1
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
0
0
1
0
0
1
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
1
0
1
1
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 4408.

Test #196:

score: 0
Accepted
time: 0ms
memory: 4004kb

input:

1
0
0
1
1
0
1
0
0
1
1
1
0
0
0
1
0
0
1
1
1
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
1
1
1
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
1
1
1
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
1
0
0
0
0
0
1
0
0
1
0
0
0
0
0
1
0
0
0
1
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
0
0
0
1
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 4556.

Test #197:

score: 0
Accepted
time: 7ms
memory: 4076kb

input:

0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
1
0
1
0
0
0
1
0
0
1
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
1
0
0
1
0
0
0
0
1
0
0
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 4634.

Test #198:

score: 0
Accepted
time: 0ms
memory: 3716kb

input:

0
1
0
0
0
1
0
0
1
0
1
1
0
0
0
1
0
0
1
1
0
1
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
1
0
1
1
0
0
1
0
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
1
0
0
1
1
0
1
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 4765.

Test #199:

score: 0
Accepted
time: 9ms
memory: 3972kb

input:

0
1
0
0
0
1
0
0
1
0
0
1
0
1
1
0
1
0
1
0
0
1
0
0
1
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
1
0
0
1
0
0
1
0
1
0
0
1
0
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
1
0
0
1
0
0
1
0
1
0
0
1
0
0
1
1
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
1
0
0
0
0
1
0
0
0
0
0
0
0
1
0
1
1
1
1
0
0
0
1
0
0
1
1
1
1
0
1
0
0
0
0
0
0
0
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 4875.

Test #200:

score: 0
Accepted
time: 6ms
memory: 3740kb

input:

0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
1
1
0
0
0
0
0
1
0
0
0
0
1
1
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
1
1
1
0
0
0
0
0
1
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
1
1
0
0
0
0
1
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 4936.

Test #201:

score: 0
Accepted
time: 7ms
memory: 4076kb

input:

0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
0
1
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
1
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
1
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 5033.

Test #202:

score: 0
Accepted
time: 0ms
memory: 3808kb

input:

0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
1
0
1
1
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
1
0
0
0
0
0
0
0
1
0
0
1
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
1
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
1
0
0
1
0
1
1
0
0
0
1
0
0
0
0
0
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 5125.

Test #203:

score: 0
Accepted
time: 4ms
memory: 3716kb

input:

1
0
0
1
0
1
1
0
0
1
1
0
0
0
0
1
0
0
0
1
1
0
0
1
1
0
0
0
1
0
0
1
0
1
1
0
0
1
0
0
0
1
1
0
0
1
1
0
0
0
1
1
0
0
0
0
0
1
0
1
1
0
0
1
0
0
1
0
0
0
1
0
0
1
1
0
1
0
0
0
0
0
1
1
0
0
0
1
1
0
0
1
1
0
0
0
1
0
0
1
1
0
0
0
0
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
1
0
1
1
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 5209.

Test #204:

score: 0
Accepted
time: 0ms
memory: 3808kb

input:

1
1
1
0
0
1
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
0
1
0
1
0
1
1
1
0
0
1
0
1
1
1
0
1
0
1
0
1
1
1
0
1
1
1
1
0
0
0
1
0
0
1
1
0
0
1
0
1
0
0
1
0
0
0
1
0
1
0
0
1
1
0
0
1
0
0
0
1
1
1
1
0
1
1
1
0
1
0
1
0
1
1
1
0
1
0
0
0
0
0
0
0
0
1
0
1
0
0
0
1
1
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
1
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 5285.

Test #205:

score: 0
Accepted
time: 0ms
memory: 4000kb

input:

0
0
0
0
1
0
0
0
0
0
0
1
0
1
0
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
...

output:

? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left
? left
? left
? flip
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? left
? left...

result:

ok Queries used; 5283.