QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#103017#5156. Going in Circlesw4p3rAC ✓57ms3528kbC++201.4kb2023-05-03 22:20:562023-05-03 22:21:00

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-05-03 22:21:00]
  • 评测
  • 测评结果:AC
  • 用时:57ms
  • 内存:3528kb
  • [2023-05-03 22:20:56]
  • 提交

answer

#include<bits/stdc++.h>
#define inf 1e9
#define eps 1e - 6
#define FOR(i, a, b) for(int i = a;i <= b;i ++)
#define REP(i, a, b) for(int i = a;i >= b;i --)
#define pa pair<int, int>
#define fr first
#define sd second
#define pb push_back
#define db double
#define MEM(a) memset(a, 0, sizeof(a))
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
inline ll read()
{
	char ch = getchar();
	ll s = 0, w = 1;
	while (ch < '0' || ch > '9') {if (ch == '-')w = -1; ch = getchar();}
	while (ch >= '0' && ch <= '9') {s = s * 10 + ch - '0'; ch = getchar();}
	return s * w;
}
inline void qry(string a, int &x)
{
	cout << "? " << a << endl;
	cin >> x;
}
int main()
{
	int t;
	cin >> t;
	FOR(len, 3, 20)
	{
		int cur = t;
		int tmp = len;
		while (tmp --) qry("right", t);
		if (t != cur) continue; tmp = len;
		qry ("flip", t);
		while (tmp --) qry("left", t);
		if (t == cur) continue;
		cout << "! " << len << endl;
		return 0;
	}
	mt19937 rnd(time(0));
	int c[20];
	FOR(i, 0, 19) c[i] = rnd() % 2;
	FOR(i, 0, 19)
	{
		if(t != c[i]) qry("flip", t);
		qry("right", t);
	}
	deque<int> now; now.push_back(t);int s = 1;
	while(true)
	{
		qry("right", t); s++; now.push_back(t);
		if(now.size() < 20) continue;
		if(now.size() > 20) now.pop_front();
		int fl = 1;
		FOR(i, 0, 19)if (c[i] != now[i]) fl = 0;
		if (fl) {cout<< "! " << s <<endl; return 0;}
	}
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 26ms
memory: 3524kb

input:

0
1
0
0
1
0
1
0
1
0
1
1
0
1
0
1
1
0
1
0
1
0
1
0
1
0
1
0
1
0
0
1
0
1
0
1
0
1
0
1
0
0
1
0
0
0
1
0
1
0
1
0
1
0
1
0
0
0
1
0
0
0
0
1
0
1
0
1
0
1
0
1
0
0
0
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
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
0
0
0
0
0
0
0
0
0
1
1
0
1
0
1
0
1
1
0
1
0
1
1
0
0
0
0
0
0
0
0
...

output:

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

result:

ok Queries used; 5334.

Test #2:

score: 0
Accepted
time: 43ms
memory: 3436kb

input:

1
0
1
1
0
1
0
1
0
1
0
1
0
0
1
0
1
0
1
0
0
0
1
1
0
0
0
0
1
0
0
0
1
1
0
1
1
0
0
0
1
1
0
0
1
0
0
0
0
1
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
1
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
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
1
0
1
0
1
0
0
1
0
1
...

output:

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

result:

ok Queries used; 5212.

Test #3:

score: 0
Accepted
time: 43ms
memory: 3520kb

input:

0
0
1
0
1
1
0
0
0
1
1
0
1
1
1
0
0
0
1
1
1
0
1
1
1
1
0
0
0
1
1
1
1
0
1
1
1
1
1
0
0
0
1
1
1
1
1
1
0
0
1
0
0
0
1
1
0
1
0
0
0
1
0
0
1
0
0
1
0
0
0
1
0
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
0
1
1
0
1
1
1
0
0
1
1
0
1
1
0
0
1
1
1
0
1
1
0
1
1
0
1
1
0
0
1
1
0
0
1
0
1
1
0
1
0
1
...

output:

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

result:

ok Queries used; 5348.

Test #4:

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

input:

0
0
1
0
1
1
0
0
0
1
1
1
0
0
1
1
0
1
1
1
1
0
1
0
1
0
1
0
1
0
1
1
1
1
1
0
0
0
1
0
0
1
1
1
1
1
0
1
1
1
1
1
0
0
1
0
1
1
0
0
1
1
1
1
1
0
1
1
1
1
1
0
0
1
1
0
1
1
1
0
0
1
1
1
1
1
0
1
1
1
1
1
0
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
0
0
1
1
1
1
1
1
1
1
0
0
1
0
0
0
1
1
0
0
1
0
1
0
1
0
...

output:

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

result:

ok Queries used; 4471.

Test #5:

score: 0
Accepted
time: 19ms
memory: 3524kb

input:

0
0
1
0
1
1
0
0
0
1
1
1
0
0
1
1
0
1
1
1
1
0
1
0
1
0
1
0
1
0
1
1
1
1
1
0
0
0
1
0
0
1
1
1
1
1
0
1
1
1
1
1
0
0
1
0
1
1
0
0
1
1
1
1
1
0
1
1
1
1
1
0
0
1
1
0
1
1
1
0
0
1
1
1
1
1
0
1
1
1
1
1
0
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
0
0
1
1
1
1
1
1
1
1
0
0
1
0
0
0
1
1
0
0
1
0
1
0
1
0
...

output:

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

result:

ok Queries used; 4472.

Test #6:

score: 0
Accepted
time: 20ms
memory: 3524kb

input:

0
0
1
0
1
1
0
0
0
1
1
1
0
0
1
1
0
1
1
1
1
0
1
0
1
0
1
0
1
0
1
1
1
1
1
0
0
0
1
0
0
1
1
1
1
1
0
1
1
1
1
1
0
0
1
0
1
1
0
0
1
1
1
1
1
0
1
1
1
1
1
0
0
1
1
0
1
1
1
0
0
1
1
1
1
1
0
1
1
1
1
1
0
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
0
0
1
1
1
1
1
1
1
1
0
0
1
0
0
0
1
1
0
0
1
0
1
0
1
0
...

output:

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

result:

ok Queries used; 4476.

Test #7:

score: 0
Accepted
time: 36ms
memory: 3500kb

input:

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

output:

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

result:

ok Queries used; 5464.

Test #8:

score: 0
Accepted
time: 21ms
memory: 3520kb

input:

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

output:

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

result:

ok Queries used; 5315.

Test #9:

score: 0
Accepted
time: 38ms
memory: 3504kb

input:

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

output:

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

result:

ok Queries used; 5461.

Test #10:

score: 0
Accepted
time: 17ms
memory: 3508kb

input:

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

output:

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

result:

ok Queries used; 4560.

Test #11:

score: 0
Accepted
time: 29ms
memory: 3456kb

input:

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

output:

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

result:

ok Queries used; 4559.

Test #12:

score: 0
Accepted
time: 19ms
memory: 3456kb

input:

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

output:

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

result:

ok Queries used; 4561.

Test #13:

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

input:

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

output:

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

result:

ok Queries used; 402.

Test #14:

score: 0
Accepted
time: 11ms
memory: 3524kb

input:

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

output:

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

result:

ok Queries used; 2090.

Test #15:

score: 0
Accepted
time: 24ms
memory: 3452kb

input:

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

output:

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

result:

ok Queries used; 3602.

Test #16:

score: 0
Accepted
time: 33ms
memory: 3452kb

input:

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

output:

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

result:

ok Queries used; 5336.

Test #17:

score: 0
Accepted
time: 27ms
memory: 3456kb

input:

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

output:

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

result:

ok Queries used; 5250.

Test #18:

score: 0
Accepted
time: 57ms
memory: 3524kb

input:

0
0
0
0
1
0
0
0
0
0
1
1
0
0
1
1
0
0
1
1
1
0
0
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
0
1
1
1
0
1
1
1
0
0
0
1
1
1
0
1
1
1
0
1
1
1
1
0
1
1
1
0
0
0
1
1
1
0
1
1
1
1
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
0
0
0
0
1
0
0
1
1
0
1
0
0
1
1
0
0
1
0
0
0
0
0
1
1
1
0
0
0
0
0
1
0
0
...

output:

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

result:

ok Queries used; 5155.

Test #19:

score: 0
Accepted
time: 22ms
memory: 3440kb

input:

1
0
0
0
0
1
0
1
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
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
0
0
1
0
1
0
0
1
0
0
0
0
1
0
0
0
1
0
0
0
1
0
0
0
0
1
0
0
0
0
0
1
0
0
1
1
0
0
0
0
1
0
1
1
0
0
0
0
1
1
0
0
1
0
0
0
0
0
1
0
0
1
1
0
0
0
0
1
1
1
0
0
0
1
0
1
0
1
...

output:

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

result:

ok Queries used; 5153.

Test #20:

score: 0
Accepted
time: 36ms
memory: 3436kb

input:

0
0
1
1
1
1
1
0
0
0
1
1
1
0
0
0
0
1
1
0
1
0
0
0
0
1
0
0
0
0
1
0
1
0
0
1
0
0
0
0
1
0
0
0
0
1
0
0
1
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
1
0
0
0
0
1
0
0
0
0
0
0
1
0
0
1
0
0
0
0
1
1
1
1
1
0
0
1
0
1
1
0
0
0
0
1
1
1
1
1
0
0
1
1
0
1
0
1
1
0
1
1
0
0
1
1
1
1
1
0
0
0
1
1
1
1
1
0
0
1
1
0
1
1
...

output:

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

result:

ok Queries used; 5291.

Test #21:

score: 0
Accepted
time: 30ms
memory: 3376kb

input:

1
0
0
0
1
0
1
1
0
1
1
1
1
0
1
1
1
0
1
0
1
1
1
0
1
0
0
1
1
1
0
1
0
1
1
1
0
0
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
0
0
1
1
1
0
1
0
0
0
0
0
1
0
1
1
1
0
0
1
1
1
0
1
0
0
0
1
0
1
1
1
0
0
0
1
1
1
1
0
0
0
1
0
1
1
1
0
0
1
0
0
1
1
0
0
0
1
0
1
0
0
1
0
0
0
1
1
0
0
1
0
0
1
1
1
0
0
1
0
0
1
1
...

output:

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

result:

ok Queries used; 5318.

Test #22:

score: 0
Accepted
time: 33ms
memory: 3480kb

input:

1
1
1
1
0
1
1
1
1
1
0
0
0
0
1
1
1
1
0
1
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
0
0
1
0
0
0
1
1
1
1
0
1
1
0
1
0
1
1
0
0
0
1
1
1
1
0
1
0
0
1
1
1
1
0
0
0
1
1
0
1
0
1
1
0
0
0
1
1
1
1
0
0
1
0
0
0
1
1
1
1
0
0
0
1
1
0
1
0
1
1
0
0
0
1
1
1
1
0
0
0
0
1
1
0
1
0
0
0
1
1
1
1
0
1
1
0
1
...

output:

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

result:

ok Queries used; 4846.

Test #23:

score: 0
Accepted
time: 52ms
memory: 3452kb

input:

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

output:

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

result:

ok Queries used; 5051.

Test #24:

score: 0
Accepted
time: 24ms
memory: 3456kb

input:

0
1
1
0
1
1
1
0
1
1
1
1
1
0
1
1
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
0
1
0
1
1
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
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
1
1
1
0
1
0
1
0
1
1
1
0
1
1
1
1
1
1
0
1
0
1
0
1
1
1
1
0
1
1
1
0
1
1
0
1
1
1
1
0
1
0
1
0
1
0
1
0
1
0
1
1
1
1
0
1
1
0
0
1
0
1
0
1
0
1
1
1
1
...

output:

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

result:

ok Queries used; 5204.

Test #25:

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

input:

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

output:

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

result:

ok Queries used; 4901.

Test #26:

score: 0
Accepted
time: 35ms
memory: 3528kb

input:

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

output:

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

result:

ok Queries used; 5348.

Test #27:

score: 0
Accepted
time: 48ms
memory: 3432kb

input:

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

output:

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

result:

ok Queries used; 5376.

Test #28:

score: 0
Accepted
time: 33ms
memory: 3428kb

input:

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

output:

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

result:

ok Queries used; 4452.

Test #29:

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

input:

1
1
1
1
0
1
1
0

output:

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

result:

ok Queries used; 7.

Test #30:

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

input:

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

output:

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

result:

ok Queries used; 16.

Test #31:

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

input:

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

output:

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

result:

ok Queries used; 27.

Test #32:

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

input:

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

output:

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

result:

ok Queries used; 40.

Test #33:

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

input:

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

output:

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

result:

ok Queries used; 55.

Test #34:

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

input:

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

output:

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

result:

ok Queries used; 72.

Test #35:

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

input:

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

output:

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

result:

ok Queries used; 91.

Test #36:

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

input:

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

output:

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

result:

ok Queries used; 112.

Test #37:

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

input:

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

output:

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

result:

ok Queries used; 561.

Test #38:

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

input:

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

output:

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

result:

ok Queries used; 1223.

Test #39:

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

input:

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

output:

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

result:

ok Queries used; 2428.

Test #40:

score: 0
Accepted
time: 32ms
memory: 3380kb

input:

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

output:

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

result:

ok Queries used; 4167.

Test #41:

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

input:

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

output:

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

result:

ok Queries used; 4554.

Test #42:

score: 0
Accepted
time: 30ms
memory: 3436kb

input:

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

output:

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

result:

ok Queries used; 5456.

Test #43:

score: 0
Accepted
time: 20ms
memory: 3380kb

input:

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

output:

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

result:

ok Queries used; 5461.

Test #44:

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

input:

0
0
0
0
1
0
0
1

output:

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

result:

ok Queries used; 7.

Test #45:

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

input:

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

output:

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

result:

ok Queries used; 16.

Test #46:

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

input:

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

output:

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

result:

ok Queries used; 27.

Test #47:

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

input:

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

output:

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

result:

ok Queries used; 40.

Test #48:

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

input:

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

output:

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

result:

ok Queries used; 55.

Test #49:

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

input:

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

output:

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

result:

ok Queries used; 72.

Test #50:

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

input:

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

output:

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

result:

ok Queries used; 91.

Test #51:

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

input:

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

output:

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

result:

ok Queries used; 112.

Test #52:

score: 0
Accepted
time: 25ms
memory: 3524kb

input:

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

output:

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

result:

ok Queries used; 559.

Test #53:

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

input:

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

output:

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

result:

ok Queries used; 805.

Test #54:

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

input:

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

output:

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

result:

ok Queries used; 1352.

Test #55:

score: 0
Accepted
time: 26ms
memory: 3424kb

input:

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

output:

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

result:

ok Queries used; 3021.

Test #56:

score: 0
Accepted
time: 33ms
memory: 3452kb

input:

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

output:

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

result:

ok Queries used; 4556.

Test #57:

score: 0
Accepted
time: 44ms
memory: 3424kb

input:

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

output:

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

result:

ok Queries used; 5459.

Test #58:

score: 0
Accepted
time: 19ms
memory: 3436kb

input:

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

output:

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

result:

ok Queries used; 5461.

Test #59:

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

input:

0
1
0
0
1
0
1
1

output:

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

result:

ok Queries used; 7.

Test #60:

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

input:

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

output:

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

result:

ok Queries used; 16.

Test #61:

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

input:

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

output:

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

result:

ok Queries used; 23.

Test #62:

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

input:

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

output:

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

result:

ok Queries used; 35.

Test #63:

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

input:

1
0
0
0
0
0
0
1
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
1
1
0
0
0
1
0
1

output:

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

result:

ok Queries used; 40.

Test #64:

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

input:

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

output:

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

result:

ok Queries used; 66.

Test #65:

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

input:

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

output:

? right
? right
? right
? right
? right
? right
? right
? right
? 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
? right
? right
? right
? right
? right
? ri...

result:

ok Queries used; 60.

Test #66:

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

input:

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

output:

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

result:

ok Queries used; 491.

Test #67:

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

input:

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

output:

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

result:

ok Queries used; 737.

Test #68:

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

input:

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

output:

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

result:

ok Queries used; 900.

Test #69:

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

input:

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

output:

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

result:

ok Queries used; 1043.

Test #70:

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

input:

1
0
0
0
1
1
1
0
1
1
1
1
0
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
0
1
0
0
1
0
0
0
1
0
1
0
1
1
1
0
1
0
1
0
0
0
1
0
0
0
0
1
0
1
0
1
1
1
0
1
0
1
0
0
0
0
1
0
0
0
0
0
1
0
1
0
1
1
1
0
1
0
1
0
0
0
0
0
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
0
0
1
1
1
0
0
1
0
0
1
1
1
...

output:

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

result:

ok Queries used; 1410.

Test #71:

score: 0
Accepted
time: 32ms
memory: 3436kb

input:

0
0
1
1
1
0
1
0
0
0
1
1
1
0
0
1
0
0
0
1
1
0
1
0
0
1
0
1
1
1
0
1
0
1
0
0
1
0
1
1
1
0
1
0
1
1
1
0
1
0
0
0
1
1
1
0
1
1
0
1
0
1
0
0
0
1
1
1
1
1
0
1
0
0
1
0
1
0
1
1
1
0
0
0
0
1
0
0
0
1
1
1
0
1
0
1
0
0
0
1
0
1
0
1
1
1
0
0
0
1
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
1
1
1
1
1
1
1
1
1
0
...

output:

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

result:

ok Queries used; 1664.

Test #72:

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

input:

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

output:

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

result:

ok Queries used; 2008.

Test #73:

score: 0
Accepted
time: 21ms
memory: 3376kb

input:

0
1
0
1
0
0
0
0
0
1
1
0
1
1
0
0
0
0
1
0
0
0
0
0
1
1
1
0
0
0
0
0
0
0
1
0
1
1
0
0
1
1
0
1
1
1
0
1
1
1
0
1
1
0
1
1
1
0
1
1
1
0
1
1
1
0
1
1
0
1
0
0
1
1
0
1
1
1
0
1
1
1
0
1
1
1
0
1
1
0
0
1
0
0
0
1
1
0
1
1
1
0
1
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
1
0
1
1
1
0
1
1
0
0
0
0
1
0
0
0
0
0
1
1
0
...

output:

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

result:

ok Queries used; 2362.

Test #74:

score: 0
Accepted
time: 34ms
memory: 3432kb

input:

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

output:

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

result:

ok Queries used; 2623.

Test #75:

score: 0
Accepted
time: 18ms
memory: 3476kb

input:

0
0
1
1
1
1
0
0
1
1
1
1
0
1
1
1
1
1
0
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
0
1
0
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
0
0
0
1
0
1
0
0
1
0
0
0
1
0
0
1
0
0
1
0
1
0
0
0
1
0
1
0
0
1
0
0
1
0
1
1
0
0
1
0
0
1
0
1
0
0
0
1
0
1
0
0
1
0
0
1
1
0
1
1
1
0
0
1
0
0
1
0
1
0
0
0
1
0
1
0
0
1
0
0
1
1
1
0
1
1
1
...

output:

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

result:

ok Queries used; 2874.

Test #76:

score: 0
Accepted
time: 18ms
memory: 3524kb

input:

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

output:

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

result:

ok Queries used; 3115.

Test #77:

score: 0
Accepted
time: 26ms
memory: 3520kb

input:

0
1
1
0
1
1
1
0
1
1
1
1
1
0
1
1
1
0
1
1
0
1
1
1
0
1
1
0
0
0
1
1
1
0
0
0
1
0
0
1
1
1
0
0
0
1
1
1
0
0
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
0
0
0
0
1
0
1
1
1
1
0
1
0
1
1
0
1
1
1
1
0
1
0
0
0
0
0
1
0
1
1
1
1
0
1
1
1
1
1
0
1
1
1
0
1
0
0
1
0
1
0
0
1
0
0
1
0
1
1
1
0
1
1
1
1
1
0
1
1
1
0
...

output:

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

result:

ok Queries used; 3431.

Test #78:

score: 0
Accepted
time: 41ms
memory: 3440kb

input:

1
0
1
1
0
1
0
1
0
1
0
1
0
0
1
0
1
0
1
0
0
1
0
0
0
1
0
1
0
1
0
0
0
1
0
0
0
0
1
0
1
0
1
0
0
0
0
1
0
0
0
0
0
1
0
1
0
1
0
0
0
0
0
1
0
0
0
0
0
0
1
0
1
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
1
1
0
0
0
0
0
0
0
1
1
0
1
1
1
1
1
0
1
0
1
1
1
0
1
1
0
1
0
1
1
1
1
1
0
1
0
1
1
1
1
1
0
1
0
1
1
...

output:

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

result:

ok Queries used; 3552.

Test #79:

score: 0
Accepted
time: 23ms
memory: 3520kb

input:

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

output:

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

result:

ok Queries used; 3822.

Test #80:

score: 0
Accepted
time: 27ms
memory: 3376kb

input:

1
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
1
1
1
0
1
0
1
0
1
1
1
1
0
1
1
0
1
1
1
0
1
1
0
1
1
0
1
0
1
1
0
1
1
0
1
0
0
1
1
0
1
1
0
1
0
1
1
0
1
1
0
0
1
0
0
0
1
1
0
1
1
0
1
0
1
1
0
1
1
0
0
0
1
0
0
0
0
1
1
0
1
1
0
1
0
1
1
0
1
1
0
0
0
0
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
0
1
0
1
0
0
1
1
1
...

output:

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

result:

ok Queries used; 4118.

Test #81:

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

input:

0
0
1
1
0
1
0
0
1
1
1
0
0
1
0
1
1
1
0
1
1
1
0
1
1
0
0
1
0
0
1
1
0
1
0
0
1
0
0
1
0
0
1
0
0
1
0
1
0
0
1
0
0
1
0
0
1
0
0
1
0
0
1
0
0
0
0
1
1
0
1
0
0
1
1
0
1
1
1
0
0
1
0
1
1
0
0
0
1
1
0
1
0
0
1
1
1
0
1
1
1
1
0
0
1
0
1
1
0
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
0
1
1
0
1
0
0
1
1
1
1
1
0
1
1
...

output:

? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? 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; 4322.

Test #82:

score: 0
Accepted
time: 36ms
memory: 3376kb

input:

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

output:

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

result:

ok Queries used; 4522.

Test #83:

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

input:

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

output:

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

result:

ok Queries used; 4820.

Test #84:

score: 0
Accepted
time: 25ms
memory: 3484kb

input:

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

output:

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

result:

ok Queries used; 4962.

Test #85:

score: 0
Accepted
time: 26ms
memory: 3488kb

input:

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

output:

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

result:

ok Queries used; 5172.

Test #86:

score: 0
Accepted
time: 22ms
memory: 3380kb

input:

1
1
0
0
0
1
1
1
0
0
1
1
0
0
1
1
1
0
1
1
0
1
1
1
1
1
0
1
1
1
1
0
1
1
1
0
1
1
1
1
0
0
0
1
0
1
1
1
1
0
0
1
0
1
1
1
1
0
1
0
0
0
1
0
1
1
1
1
0
1
0
1
1
0
1
1
1
1
0
1
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
1
0
1
1
1
1
0
1
1
1
1
0
0
1
0
0
1
1
1
1
0
1
0
0
1
1
1
1
0
0
0
0
1
0
1
1
1
0
1
1
1
1
0
1
...

output:

? right
? right
? right
? right
? right
? right
? right
? right
? 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
? right
? right
? right
? right
? right
? ri...

result:

ok Queries used; 5305.

Test #87:

score: 0
Accepted
time: 40ms
memory: 3428kb

input:

1
0
0
1
0
0
0
1
0
0
0
1
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
1
1
0
1
0
0
0
0
0
1
0
0
0
0
0
1
0
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
1
1
1
0
1
0
0
1
0
0
1
1
1
1
1
1
0
0
0
0
0
1
0
0
0
1
1
1
0
0
1
0
1
1
1
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
1
1
1
0
1
1
1
1
1
0
0
1
0
0
1
0
0
1
0
0
1
0
...

output:

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

result:

ok Queries used; 5341.

Test #88:

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

input:

1
1
0
1
0
0
1
0

output:

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

result:

ok Queries used; 7.

Test #89:

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

input:

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

output:

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

result:

ok Queries used; 16.

Test #90:

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

input:

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

output:

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

result:

ok Queries used; 27.

Test #91:

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

input:

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

output:

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

result:

ok Queries used; 35.

Test #92:

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

input:

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

output:

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

result:

ok Queries used; 48.

Test #93:

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

input:

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

output:

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

result:

ok Queries used; 64.

Test #94:

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

input:

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

output:

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

result:

ok Queries used; 392.

Test #95:

score: 0
Accepted
time: 23ms
memory: 3520kb

input:

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

output:

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

result:

ok Queries used; 557.

Test #96:

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

input:

1
1
1
0
1
1
1
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
0
1
0
0
0
1
1
1
1
1
1
1
1
1
0
0
0
1
0
0
0
0
1
1
1
1
1
1
1
1
1
0
0
0
0
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
1
1
0
1
1
1
1
1
1
0
0
1
1
1
1
1
1
1
1
1
1
0
1
1
1
0
1
1
1
0
1
1
0
1
1
1
1
0
0
0
1
1
1
...

output:

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

result:

ok Queries used; 580.

Test #97:

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

input:

1
1
0
1
0
0
1
1
1
0
0
1
0
0
0
1
1
1
0
0
0
0
1
1
0
0
1
1
1
0
1
1
0
1
1
0
1
0
1
1
0
1
1
1
0
1
1
0
1
0
1
0
0
1
0
1
1
0
1
1
1
0
1
1
0
1
0
0
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
0
1
1
1
1
1
0
1
0
0
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
0
0
0
1
1
1
0
1
0
0
1
1
1
...

output:

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

result:

ok Queries used; 703.

Test #98:

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

input:

1
1
0
1
0
0
1
1
1
0
0
1
0
0
0
1
1
1
0
0
0
1
0
0
0
0
1
1
1
0
0
0
0
1
0
0
0
0
0
1
1
1
0
0
0
0
0
1
0
0
0
0
0
0
1
1
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
0
0
1
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
0
0
1
1
1
0
0
0
0
0
0
0
0
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
1
1
0
...

output:

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

result:

ok Queries used; 893.

Test #99:

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

input:

1
1
1
0
1
0
1
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
0
1
0
0
0
1
1
1
1
1
1
1
1
1
0
0
0
1
0
0
0
0
1
1
1
1
1
1
1
1
1
0
0
0
0
1
0
0
0
0
0
1
1
1
1
1
1
1
1
1
0
0
0
0
0
1
0
0
0
0
0
0
1
1
1
1
1
1
1
1
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
1
...

output:

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

result:

ok Queries used; 921.

Test #100:

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

input:

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

output:

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

result:

ok Queries used; 1023.

Test #101:

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

input:

1
1
1
0
1
1
0
1
1
0
1
1
1
0
1
1
0
1
1
1
0
1
1
0
1
0
0
1
1
0
1
1
1
0
1
1
0
0
0
1
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
0
1
0
1
0
1
0
0
1
0
1
0
1
1
1
1
1
1
1
1
1
0
1
0
1
0
0
1
0
0
0
1
0
1
0
1
1
1
1
1
1
1
1
1
0
1
0
1
0
0
0
1
0
0
0
0
1
0
1
0
1
1
1
1
1
1
1
1
1
0
1
0
1
0
0
0
0
1
0
0
...

output:

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

result:

ok Queries used; 1190.

Test #102:

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

input:

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

output:

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

result:

ok Queries used; 1254.

Test #103:

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

input:

1
1
1
1
0
1
1
1
1
1
0
1
0
0
1
1
1
1
1
0
0
1
0
0
0
1
1
1
1
1
0
0
0
1
0
0
0
0
1
1
1
1
1
0
0
0
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
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
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
0
1
1
1
1
1
1
1
0
0
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

output:

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

result:

ok Queries used; 1328.

Test #104:

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

input:

1
1
1
1
0
1
1
1
1
1
0
1
0
0
1
1
1
1
1
0
0
0
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
0
1
1
0
1
0
0
1
1
0
1
1
1
1
1
1
1
0
1
1
0
0
0
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
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
0
1
0
0
1
1
1
1
0
1
1
1
1
1
1
1
1
1
1
1
0
1
1
1
1
0
0
1
0
0
0
1
1
1
1
0
1
1
1
...

output:

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

result:

ok Queries used; 1452.

Test #105:

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

input:

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

output:

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

result:

ok Queries used; 1545.

Test #106:

score: 0
Accepted
time: 19ms
memory: 3380kb

input:

0
1
0
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
0
1
0
0
0
1
1
1
1
1
1
1
0
0
0
0
1
1
1
1
1
1
1
1
1
1
1
0
0
1
1
1
1
0
1
1
1
0
0
1
1
1
1
1
1
1
0
0
1
1
1
0
1
0
0
1
1
1
0
0
1
1
1
1
1
1
1
0
0
1
1
1
0
0
1
0
0
0
1
1
1
0
0
1
1
1
1
1
1
1
0
0
1
1
1
0
0
0
1
0
0
0
0
1
1
1
0
0
1
1
1
1
1
1
1
0
0
1
1
1
0
0
...

output:

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

result:

ok Queries used; 1669.

Test #107:

score: 0
Accepted
time: 19ms
memory: 3440kb

input:

1
0
1
0
1
1
1
1
0
1
0
1
1
0
1
0
1
0
1
0
1
0
1
0
1
0
0
1
0
1
0
1
0
1
0
1
0
0
1
0
0
0
1
0
1
0
1
0
1
0
1
0
0
0
0
0
0
1
1
1
1
0
0
0
1
0
0
1
1
1
1
0
0
0
0
0
1
1
1
1
0
0
1
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
1
1
1
1
1
0
1
0
1
1
0
1
0
0
1
1
0
1
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
1
0
1
1
0
0
1
0
0
...

output:

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

result:

ok Queries used; 1628.

Test #108:

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

input:

1
1
1
0
1
1
1
1
0
1
0
1
1
0
1
0
1
0
1
0
1
0
1
0
1
0
0
1
0
1
0
1
0
1
0
1
0
0
1
0
0
0
1
0
1
0
1
0
1
0
1
0
0
0
1
0
0
0
0
1
0
1
0
1
0
1
0
1
0
0
0
0
0
1
1
1
1
1
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
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
0
0
1
1
1
1
1
0
0
1
0
0
0
1
1
1
...

output:

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

result:

ok Queries used; 1801.

Test #109:

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

input:

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

output:

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

result:

ok Queries used; 1920.

Test #110:

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

input:

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

output:

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

result:

ok Queries used; 2112.

Test #111:

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

input:

1
1
1
1
0
1
1
1
1
1
0
1
0
0
1
1
1
1
1
0
0
0
1
1
0
1
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
0
1
1
1
1
1
1
0
1
1
1
0
1
1
1
1
1
1
0
1
0
0
1
1
1
1
1
1
0
1
1
1
0
1
1
1
1
1
1
0
0
1
0
0
0
1
1
1
1
1
1
0
1
1
1
0
1
1
1
1
1
1
0
0
0
1
0
0
0
0
1
1
1
1
1
1
0
1
1
1
0
1
1
1
1
1
1
0
0
0
0
1
0
0
0
0
0
1
...

output:

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

result:

ok Queries used; 2114.

Test #112:

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

input:

1
1
1
1
0
1
1
1
1
1
0
1
0
0
1
1
1
1
1
0
0
0
0
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
1
0
1
0
0
1
1
1
0
1
1
1
1
1
0
1
1
1
0
0
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
1
0
1
1
1
0
1
0
1
0
1
0
1
1
1
0
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
1
1
0
1
1
1
1
1
1
1
1
...

output:

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

result:

ok Queries used; 2249.

Test #113:

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

input:

1
1
0
1
0
0
1
1
1
0
0
1
0
0
0
1
1
1
0
0
0
1
0
0
0
0
1
1
1
0
0
0
0
1
0
0
0
0
0
1
1
1
0
0
0
0
0
1
0
0
0
0
0
0
1
1
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
0
0
1
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
0
0
1
1
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
...

output:

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

result:

ok Queries used; 2398.

Test #114:

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

input:

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

output:

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

result:

ok Queries used; 2518.

Test #115:

score: 0
Accepted
time: 15ms
memory: 3432kb

input:

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

output:

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

result:

ok Queries used; 2549.

Test #116:

score: 0
Accepted
time: 19ms
memory: 3440kb

input:

1
1
0
1
0
0
1
1
1
0
0
1
0
0
0
1
1
1
0
0
0
1
0
0
0
0
1
1
1
0
0
0
0
1
0
0
0
0
0
1
1
1
0
0
0
0
0
1
0
0
0
0
0
0
1
1
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
0
0
1
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
0
0
1
1
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
1
1
...

output:

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

result:

ok Queries used; 2565.

Test #117:

score: 0
Accepted
time: 13ms
memory: 3436kb

input:

0
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
0
1
0
0
0
1
1
1
1
1
1
1
0
0
0
1
0
0
0
0
1
1
1
1
1
1
1
0
0
0
0
1
0
0
0
0
0
1
1
1
1
1
1
1
0
0
0
0
0
1
0
0
0
0
0
0
1
1
1
1
1
1
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
1
1
1
1
1
0
0
0
0
0
0
0
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
0
0
1
1
1
...

output:

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

result:

ok Queries used; 2744.

Test #118:

score: 0
Accepted
time: 11ms
memory: 3452kb

input:

1
0
1
0
1
1
0
0
1
0
1
1
0
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
0
0
1
1
1
1
1
1
1
1
1
1
1
0
0
1
0
0
0
1
1
1
1
1
1
1
1
1
1
1
0
0
0
1
0
0
0
0
1
1
1
1
1
1
1
1
1
1
1
0
0
0
0
1
0
0
0
0
0
1
1
1
1
1
1
1
1
1
1
1
0
0
0
0
0
0
1
1
1
1
0
1
1
0
1
1
1
0
1
1
1
1
0
1
1
0
1
1
1
1
0
1
1
1
1
0
1
1
0
1
1
1
...

output:

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

result:

ok Queries used; 2861.

Test #119:

score: 0
Accepted
time: 15ms
memory: 3504kb

input:

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

output:

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

result:

ok Queries used; 2992.

Test #120:

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

input:

1
1
1
1
0
1
1
1
1
1
0
1
0
0
1
1
1
1
1
0
0
1
0
0
0
1
1
1
1
1
0
0
0
1
0
0
0
0
1
1
1
1
1
0
0
0
0
1
0
0
0
0
0
1
1
1
1
1
0
0
0
0
0
1
0
0
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
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
...

output:

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

result:

ok Queries used; 3070.

Test #121:

score: 0
Accepted
time: 40ms
memory: 3524kb

input:

1
1
1
1
0
1
1
1
1
1
0
1
0
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
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
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
0
1
1
1
1
1
1
1
1
1
1
0
1
0
1
1
1
1
1
1
1
1
1
1
0
1
0
0
1
1
1
1
1
1
1
1
1
1
0
1
0
1
1
1
1
1
1
1
1
1
1
0
0
0
1
...

output:

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

result:

ok Queries used; 3163.

Test #122:

score: 0
Accepted
time: 29ms
memory: 3376kb

input:

1
1
1
1
0
1
1
1
1
1
0
1
0
0
1
1
1
1
1
0
0
0
1
1
1
0
1
1
0
1
0
1
1
1
1
0
1
1
1
0
1
0
1
0
1
0
1
1
1
0
1
0
0
1
1
1
0
1
0
1
0
1
0
1
1
1
0
0
1
0
0
0
1
1
1
0
1
0
1
0
1
0
1
1
1
0
0
0
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
1
1
1
1
1
1
0
0
1
0
0
0
1
1
1
1
1
1
1
1
1
...

output:

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

result:

ok Queries used; 3232.

Test #123:

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

input:

1
0
1
0
1
1
1
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
0
0
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
0
1
1
1
1
1
0
1
0
0
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
0
0
1
0
0
0
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
0
0
0
1
0
0
0
0
1
1
1
1
1
0
1
1
1
1
1
0
1
1
1
1
1
0
0
0
0
1
0
0
...

output:

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

result:

ok Queries used; 3277.

Test #124:

score: 0
Accepted
time: 27ms
memory: 3460kb

input:

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

output:

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

result:

ok Queries used; 3463.

Test #125:

score: 0
Accepted
time: 19ms
memory: 3484kb

input:

1
0
1
1
0
1
0
1
0
1
0
0
1
1
1
0
0
1
0
1
1
1
0
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
0
0
1
0
0
0
1
1
1
0
1
1
1
0
1
1
1
0
0
0
1
0
0
0
0
1
1
1
0
1
1
1
0
1
1
1
0
0
0
0
1
0
0
0
0
0
1
1
1
0
1
1
1
0
1
1
1
0
0
0
0
0
1
0
0
0
0
0
0
1
1
1
0
1
1
1
0
1
1
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
1
0
1
1
1
...

output:

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

result:

ok Queries used; 3600.

Test #126:

score: 0
Accepted
time: 18ms
memory: 3524kb

input:

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

output:

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

result:

ok Queries used; 3751.

Test #127:

score: 0
Accepted
time: 30ms
memory: 3436kb

input:

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

output:

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

result:

ok Queries used; 3807.

Test #128:

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

input:

1
0
0
1
0
0
0
1
0
0
0
1
0
0
0
0
1
0
0
0
0
1
0
0
0
0
0
1
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
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
1
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
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
0
1
0
0
...

output:

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

result:

ok Queries used; 3897.

Test #129:

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

input:

0
0
0
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
0
1
0
0
0
1
1
1
1
1
1
1
0
0
0
0
1
0
1
0
1
1
1
0
1
1
1
1
0
1
0
1
0
1
0
1
0
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
0
1
1
1
1
0
1
1
1
0
1
0
0
1
1
1
0
1
1
1
1
0
1
0
1
1
1
1
0
1
1
1
0
0
0
1
1
0
1
1
1
1
1
0
0
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

output:

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

result:

ok Queries used; 3983.

Test #130:

score: 0
Accepted
time: 22ms
memory: 3520kb

input:

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

output:

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

result:

ok Queries used; 4060.

Test #131:

score: 0
Accepted
time: 27ms
memory: 3508kb

input:

1
1
0
1
0
0
1
1
1
0
0
1
0
0
0
1
1
1
0
0
0
1
0
0
0
0
1
1
1
0
0
0
0
1
0
0
0
0
0
1
1
1
0
0
0
0
0
1
0
0
0
0
0
0
1
1
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
0
0
1
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
0
0
1
1
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
...

output:

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

result:

ok Queries used; 4195.

Test #132:

score: 0
Accepted
time: 31ms
memory: 3504kb

input:

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

output:

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

result:

ok Queries used; 4251.

Test #133:

score: 0
Accepted
time: 34ms
memory: 3480kb

input:

1
1
1
1
0
1
1
1
1
1
0
1
0
0
1
1
1
1
1
0
0
1
0
0
0
1
1
1
1
1
0
0
0
1
0
0
0
0
1
1
1
1
1
0
0
0
0
1
0
0
0
0
0
1
1
1
1
1
0
0
0
0
0
1
0
0
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
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
1
1
1
0
1
1
1
1
1
1
0
...

output:

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

result:

ok Queries used; 4396.

Test #134:

score: 0
Accepted
time: 22ms
memory: 3428kb

input:

1
1
0
1
0
0
1
1
1
0
0
1
0
0
0
1
1
1
0
0
0
1
0
0
0
0
1
1
1
0
0
0
0
1
0
0
0
0
0
1
1
1
0
0
0
0
0
1
0
0
0
0
0
0
1
1
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
0
0
1
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
0
0
1
1
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
...

output:

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

result:

ok Queries used; 4468.

Test #135:

score: 0
Accepted
time: 29ms
memory: 3524kb

input:

1
0
0
1
0
0
0
1
0
0
0
1
0
0
0
0
1
0
0
0
0
1
0
0
0
0
0
1
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
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
1
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
0
0
0
0
0
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
0
...

output:

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

result:

ok Queries used; 4509.

Test #136:

score: 0
Accepted
time: 35ms
memory: 3432kb

input:

1
1
1
1
0
1
1
1
1
1
0
1
0
0
1
1
1
1
1
0
0
1
0
0
0
1
1
1
1
1
0
0
0
1
0
0
0
0
1
1
1
1
1
0
0
0
0
1
0
0
0
0
0
1
1
1
1
1
0
0
0
0
0
1
0
0
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
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
1
1
1
0
1
1
1
1
1
1
0
...

output:

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

result:

ok Queries used; 4707.

Test #137:

score: 0
Accepted
time: 13ms
memory: 3480kb

input:

1
1
0
1
0
0
1
1
1
0
0
1
0
0
0
1
1
1
0
0
0
1
0
0
0
0
1
1
1
0
0
0
0
1
0
0
0
0
0
1
1
1
0
0
0
0
0
0
1
1
1
1
1
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
0
1
1
1
1
0
1
1
1
0
0
0
1
0
1
0
1
1
0
1
0
0
1
1
1
1
0
1
1
1
0
0
1
0
1
1
0
1
0
1
0
1
0
1
1
0
1
0
0
1
1
1
0
1
0
0
1
1
1
0
0
1
0
1
1
...

output:

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

result:

ok Queries used; 4679.

Test #138:

score: 0
Accepted
time: 28ms
memory: 3520kb

input:

1
1
1
1
0
1
1
1
1
1
0
1
0
0
1
1
1
1
1
0
0
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
1
0
1
0
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
0
1
0
0
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
0
0
1
0
0
0
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
0
0
0
1
0
0
0
0
0
1
1
1
1
1
1
1
1
1
1
1
1
1
0
0
0
0
0
1
0
0
0
0
0
0
1
1
1
1
1
1
1
1
1
...

output:

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

result:

ok Queries used; 4893.

Test #139:

score: 0
Accepted
time: 20ms
memory: 3504kb

input:

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

output:

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

result:

ok Queries used; 4974.

Test #140:

score: 0
Accepted
time: 20ms
memory: 3432kb

input:

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

output:

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

result:

ok Queries used; 5044.

Test #141:

score: 0
Accepted
time: 28ms
memory: 3480kb

input:

1
1
1
1
0
1
1
1
1
1
0
1
0
0
1
1
1
1
1
0
0
1
0
0
0
1
1
1
1
1
0
0
0
1
0
0
0
0
1
1
1
1
1
0
0
0
0
1
0
0
0
0
0
1
1
1
1
1
0
0
0
0
0
1
0
0
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
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
0
...

output:

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

result:

ok Queries used; 5173.

Test #142:

score: 0
Accepted
time: 20ms
memory: 3380kb

input:

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

output:

? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? right
? 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
? right
?...

result:

ok Queries used; 5270.

Test #143:

score: 0
Accepted
time: 22ms
memory: 3388kb

input:

1
1
1
0
1
1
1
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
0
1
0
0
0
1
1
1
1
1
1
1
1
1
0
0
0
1
0
0
0
0
1
1
1
1
1
1
1
1
1
0
0
0
0
1
0
0
0
0
0
1
1
1
1
1
1
1
1
1
0
0
0
0
0
1
0
0
0
0
0
0
1
1
1
1
1
1
1
1
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
1
...

output:

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

result:

ok Queries used; 5437.

Test #144:

score: 0
Accepted
time: 35ms
memory: 3528kb

input:

1
1
1
1
0
1
1
1
1
1
0
0
1
1
0
1
1
1
0
1
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
1
0
0
0
1
0
0
0
0
1
1
0
0
1
1
1
1
1
0
0
1
1
0
0
0
0
1
0
0
0
0
0
1
1
0
0
1
1
1
1
1
0
0
1
1
0
0
0
0
0
1
0
0
0
0
0
0
1
1
0
0
1
1
1
1
1
0
0
1
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
0
0
1
1
1
1
1
0
0
1
1
0
...

output:

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

result:

ok Queries used; 5343.

Test #145:

score: 0
Accepted
time: 22ms
memory: 3504kb

input:

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

output:

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

result:

ok Queries used; 5461.

Test #146:

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

input:

1
0
1
1
0
1
0
0

output:

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

result:

ok Queries used; 7.

Test #147:

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

input:

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

output:

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

result:

ok Queries used; 16.

Test #148:

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

input:

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

output:

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

result:

ok Queries used; 23.

Test #149:

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

input:

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

output:

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

result:

ok Queries used; 36.

Test #150:

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

input:

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

output:

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

result:

ok Queries used; 44.

Test #151:

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

input:

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

output:

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

result:

ok Queries used; 55.

Test #152:

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

input:

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

output:

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

result:

ok Queries used; 78.

Test #153:

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

input:

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

output:

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

result:

ok Queries used; 88.

Test #154:

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

input:

0
0
0
0
1
0
0
0
0
0
1
0
1
1
0
0
0
0
0
1
1
0
1
1
1
0
0
0
0
0
1
1
1
1
1
1
1
1
0
0
1
0
0
0
1
1
1
1
1
1
1
1
1
0
0
0
0
1
0
1
0
0
0
1
1
0
1
1
1
0
0
0
1
0
1
0
1
0
1
0
0
0
1
1
1
1
0
0
1
1
1
1
0
0
0
0
0
0
1
0
0
0
0
1
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
1
0
1
1
0
0
0
0
1
0
0
0
0
1
0
0
0
...

output:

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

result:

ok Queries used; 467.

Test #155:

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

input:

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

output:

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

result:

ok Queries used; 562.

Test #156:

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

input:

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

output:

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

result:

ok Queries used; 765.

Test #157:

score: 0
Accepted
time: 19ms
memory: 3504kb

input:

0
1
0
0
1
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
1
1
1
0
1
0
1
0
1
1
1
0
1
1
1
1
0
1
0
1
0
1
1
1
1
0
1
1
1
1
1
0
1
0
1
0
1
1
1
1
1
0
1
1
1
1
1
1
0
1
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
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
0
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
0
1
0
1
1
1
1
1
1
1
1
1
1
1
0
...

output:

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

result:

ok Queries used; 683.

Test #158:

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

input:

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

output:

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

result:

ok Queries used; 899.

Test #159:

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

input:

0
0
1
0
1
1
0
0
0
1
1
0
1
1
1
0
0
0
1
1
1
0
1
1
1
1
0
0
0
1
1
1
1
0
1
1
1
1
1
0
0
0
1
1
1
1
1
0
1
1
1
1
1
1
0
0
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
0
0
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
1
1
0
1
1
1
1
1
1
1
1
1
0
0
0
1
1
1
1
1
1
1
1
1
1
0
0
1
0
0
0
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
...

output:

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

result:

ok Queries used; 1010.

Test #160:

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

input:

0
0
0
0
1
0
0
0
0
0
1
0
1
1
0
0
0
0
0
1
1
0
1
1
1
0
0
0
0
0
1
1
1
0
1
1
1
1
0
0
0
0
0
1
1
1
1
0
1
1
1
1
1
0
0
0
0
0
1
1
1
1
1
0
1
1
1
1
1
1
0
0
0
0
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
0
0
0
0
1
1
1
1
1
1
1
1
0
1
0
1
0
0
0
0
0
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
0
0
0
0
0
0
0
0
0
1
1
...

output:

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

result:

ok Queries used; 1035.

Test #161:

score: 0
Accepted
time: 25ms
memory: 3488kb

input:

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

output:

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

result:

ok Queries used; 1213.

Test #162:

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

input:

0
0
0
0
1
0
0
0
0
0
1
1
0
0
0
1
0
0
1
0
0
1
0
1
1
0
0
1
0
0
0
1
0
0
1
1
0
1
1
1
0
0
1
0
0
0
1
0
0
1
1
1
1
0
0
0
0
1
0
0
1
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
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
0
1
0
0
1
1
0
1
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
1
1
0
1
1
1
1
0
0
...

output:

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

result:

ok Queries used; 1269.

Test #163:

score: 0
Accepted
time: 15ms
memory: 3504kb

input:

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

output:

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

result:

ok Queries used; 1367.

Test #164:

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

input:

0
1
0
0
1
0
1
0
1
0
1
1
0
1
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
0
0
0
0
0
0
1
1
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
1
1
1
0
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
1
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
0
0
0
0
0
...

output:

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

result:

ok Queries used; 1509.

Test #165:

score: 0
Accepted
time: 21ms
memory: 3524kb

input:

1
0
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
1
0
1
1
1
0
0
0
0
0
0
0
1
1
1
0
1
1
1
1
0
0
0
0
0
0
0
1
1
1
1
0
1
1
1
1
1
0
0
0
0
0
0
0
1
1
1
1
1
0
1
1
1
1
1
1
0
0
0
0
0
0
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
0
0
0
0
0
0
1
1
1
1
1
1
1
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
1
0
1
1
0
...

output:

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

result:

ok Queries used; 1542.

Test #166:

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

input:

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
1
1
0
0
0
0
0
0
0
0
0
1
1
0
1
1
1
0
0
0
0
0
0
0
0
0
1
1
1
0
1
1
1
1
0
0
0
0
0
0
0
0
0
1
1
1
1
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
1
1
1
1
1
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
1
1
1
1
1
1
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
1
0
0
0
0
0
0
0
0
0
...

output:

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

result:

ok Queries used; 1679.

Test #167:

score: 0
Accepted
time: 15ms
memory: 3376kb

input:

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

output:

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

result:

ok Queries used; 1762.

Test #168:

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

input:

0
1
0
0
1
0
1
0
1
0
1
1
0
0
0
0
0
0
0
1
0
0
0
1
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
1
1
0
1
1
1
0
0
1
0
0
0
0
0
1
0
0
1
1
1
0
1
1
1
1
0
0
1
0
0
0
0
0
1
0
0
1
1
1
1
0
1
1
1
1
1
0
0
1
0
0
0
0
0
1
0
0
1
1
1
1
1
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
1
1
0
0
1
0
0
0
1
0
0
0
...

output:

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

result:

ok Queries used; 1730.

Test #169:

score: 0
Accepted
time: 26ms
memory: 3380kb

input:

0
0
1
0
1
1
0
0
0
1
1
0
1
1
1
0
0
0
1
1
1
0
1
1
1
1
0
0
0
1
1
1
1
1
0
1
0
1
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
0
1
1
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
0
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
1
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
...

output:

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

result:

ok Queries used; 1895.

Test #170:

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

input:

0
0
0
0
1
0
0
0
0
0
1
0
1
1
0
0
0
0
0
1
1
0
1
1
1
0
0
0
0
0
1
1
1
0
1
1
1
1
0
0
0
0
0
1
1
1
1
0
1
1
1
1
1
0
0
0
0
0
1
1
1
1
1
0
1
1
1
1
1
1
0
0
0
0
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
0
0
0
0
1
1
1
1
1
1
1
1
0
0
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
1
0
1
0
0
0
1
0
0
1
0
0
0
...

output:

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

result:

ok Queries used; 1984.

Test #171:

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

input:

0
0
0
0
1
0
0
0
0
0
1
0
1
1
0
0
0
0
0
1
1
1
0
0
0
0
1
0
0
0
0
1
0
0
1
0
0
1
1
0
1
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
1
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
1
0
0
0
0
1
1
0
1
1
1
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
1
1
1
0
1
1
1
1
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
1
1
1
1
0
1
1
1
1
1
0
...

output:

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

result:

ok Queries used; 2112.

Test #172:

score: 0
Accepted
time: 13ms
memory: 3376kb

input:

0
0
0
0
1
0
0
0
0
0
1
1
0
0
0
1
0
0
1
0
0
0
1
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
1
0
1
1
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
1
1
1
0
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
1
0
1
1
0
0
0
0
0
1
...

output:

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

result:

ok Queries used; 2127.

Test #173:

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

input:

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

output:

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

result:

ok Queries used; 2317.

Test #174:

score: 0
Accepted
time: 18ms
memory: 3480kb

input:

0
0
0
0
1
0
0
0
0
0
1
0
1
1
0
0
0
0
0
1
1
1
1
0
1
0
0
0
0
0
0
1
0
1
1
1
0
0
1
1
0
0
1
0
0
0
1
1
0
0
1
1
1
0
0
1
1
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
1
0
0
1
0
1
0
1
1
0
1
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
1
0
1
1
0
1
1
1
0
1
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
1
0
1
1
1
0
1
1
1
1
0
1
0
...

output:

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

result:

ok Queries used; 2428.

Test #175:

score: 0
Accepted
time: 19ms
memory: 3384kb

input:

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

output:

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

result:

ok Queries used; 2540.

Test #176:

score: 0
Accepted
time: 11ms
memory: 3432kb

input:

0
1
0
0
1
0
1
0
1
0
1
1
1
0
0
0
1
0
0
0
0
1
1
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
1
0
1
1
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
1
1
1
0
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
1
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
...

output:

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

result:

ok Queries used; 2634.

Test #177:

score: 0
Accepted
time: 21ms
memory: 3452kb

input:

0
0
0
1
0
0
0
1
0
0
0
0
1
0
0
0
0
0
1
0
0
1
0
0
1
0
1
0
0
1
0
1
0
0
1
0
1
0
1
1
0
1
0
0
1
0
1
0
0
1
0
1
1
0
1
1
1
0
1
0
0
1
0
1
0
0
1
0
1
1
1
0
1
1
1
1
0
1
0
0
1
0
1
0
0
1
0
1
1
1
1
0
1
1
1
1
1
0
1
0
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
0
1
0
0
1
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
1
0
0
1
...

output:

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

result:

ok Queries used; 2796.

Test #178:

score: 0
Accepted
time: 29ms
memory: 3456kb

input:

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

output:

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

result:

ok Queries used; 2936.

Test #179:

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

input:

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

output:

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

result:

ok Queries used; 2984.

Test #180:

score: 0
Accepted
time: 17ms
memory: 3428kb

input:

0
0
0
0
1
0
0
0
0
0
1
0
1
1
0
0
0
0
0
1
1
0
1
1
1
0
0
0
0
0
1
1
1
0
1
1
1
1
0
0
0
0
0
1
1
1
1
0
1
1
1
1
1
0
0
0
0
0
1
1
1
1
1
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
0
0
0
1
0
1
1
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
...

output:

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

result:

ok Queries used; 3030.

Test #181:

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

input:

0
0
0
0
1
0
0
0
0
0
1
0
1
1
0
0
0
0
0
1
1
0
1
1
1
0
0
0
0
0
1
1
1
0
1
1
1
1
0
0
0
0
0
1
1
1
1
0
1
1
1
1
1
0
0
0
0
0
1
1
1
1
1
0
1
1
1
1
1
1
0
0
0
0
0
1
1
1
1
1
1
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
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
0
0
0
0
0
0
0
0
0
...

output:

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

result:

ok Queries used; 3125.

Test #182:

score: 0
Accepted
time: 41ms
memory: 3448kb

input:

0
0
0
0
1
0
0
0
0
0
1
0
1
1
0
0
0
0
0
1
1
0
1
1
1
0
0
0
0
0
1
1
1
0
1
1
1
1
0
0
0
0
0
1
1
1
1
0
1
1
1
1
1
0
0
0
0
0
1
1
1
1
1
0
1
1
1
1
1
1
0
0
0
0
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
0
0
0
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
0
0
0
0
1
1
1
1
1
1
1
1
1
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
1
...

output:

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

result:

ok Queries used; 3313.

Test #183:

score: 0
Accepted
time: 24ms
memory: 3448kb

input:

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

output:

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

result:

ok Queries used; 3350.

Test #184:

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

input:

1
1
1
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
1
0
1
1
1
0
0
0
0
0
0
0
1
1
1
0
1
1
1
1
0
0
0
0
0
0
0
1
1
1
1
0
1
1
1
1
1
0
0
0
0
0
0
0
1
1
1
1
1
0
1
1
1
1
1
1
0
0
0
0
0
0
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
0
0
0
0
0
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
...

output:

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

result:

ok Queries used; 3443.

Test #185:

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

input:

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

output:

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

result:

ok Queries used; 3674.

Test #186:

score: 0
Accepted
time: 18ms
memory: 3420kb

input:

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

output:

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

result:

ok Queries used; 3672.

Test #187:

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

input:

0
1
0
0
1
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
1
1
1
0
1
0
1
0
1
1
1
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
1
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
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
1
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
1
0
1
1
1
0
0
0
1
0
0
0
0
0
...

output:

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

result:

ok Queries used; 3769.

Test #188:

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

input:

0
0
0
0
1
0
0
0
0
0
1
0
1
1
0
0
0
0
0
1
1
0
1
1
1
0
0
0
0
0
1
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
0
1
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
1
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
0
1
0
0
0
0
1
1
0
1
1
1
0
0
0
0
1
0
0
0
0
...

output:

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

result:

ok Queries used; 3893.

Test #189:

score: 0
Accepted
time: 52ms
memory: 3524kb

input:

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

output:

? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? left
? 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; 3893.

Test #190:

score: 0
Accepted
time: 24ms
memory: 3424kb

input:

0
0
0
0
1
0
0
0
0
0
1
1
0
0
1
0
0
1
0
1
0
0
0
1
0
0
1
0
1
0
1
0
1
0
0
1
0
1
1
0
0
1
0
1
0
1
0
1
0
0
1
1
1
1
1
0
1
1
0
0
1
1
0
1
0
0
1
1
0
1
1
1
1
1
0
1
1
0
0
1
0
0
0
0
1
0
0
0
1
0
0
0
1
1
0
0
0
1
1
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
1
0
0
0
0
0
0
0
1
0
1
1
0
0
...

output:

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

result:

ok Queries used; 3990.

Test #191:

score: 0
Accepted
time: 22ms
memory: 3504kb

input:

1
0
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
1
0
1
1
1
0
0
0
0
0
0
0
1
1
1
0
1
1
1
1
0
0
0
0
0
0
0
1
1
1
1
0
1
1
1
1
1
0
0
0
0
0
0
0
1
1
1
1
1
0
1
1
1
1
1
1
0
0
0
0
0
0
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
0
0
0
0
0
0
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
...

output:

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

result:

ok Queries used; 4142.

Test #192:

score: 0
Accepted
time: 24ms
memory: 3452kb

input:

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
0
0
0
1
0
0
1
0
1
0
0
0
0
0
0
0
0
0
1
0
1
0
1
1
0
1
0
0
0
0
0
0
0
0
0
1
0
1
1
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
0
0
0
0
0
1
1
1
0
0
0
0
0
0
1
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
1
1
1
0
0
0
0
0
0
1
0
0
0
0
0
...

output:

? right
? right
? right
? right
? right
? right
? right
? flip
? left
? left
? left
? left
? right
? 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
? right
?...

result:

ok Queries used; 4205.

Test #193:

score: 0
Accepted
time: 36ms
memory: 3436kb

input:

0
0
0
0
1
0
0
0
0
0
1
0
1
1
0
0
0
0
0
1
1
0
1
1
1
0
0
0
0
0
1
1
1
0
1
1
1
1
0
0
0
0
0
1
1
1
1
0
1
1
1
1
1
0
0
0
0
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
1
1
0
0
0
0
1
0
0
0
1
1
0
1
0
0
0
0
0
1
0
1
1
0
0
0
1
0
1
1
0
0
0
1
1
0
1
0
0
0
0
0
1
0
1
1
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
...

output:

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

result:

ok Queries used; 4311.

Test #194:

score: 0
Accepted
time: 20ms
memory: 3500kb

input:

0
0
0
0
1
0
0
0
0
0
1
0
1
1
0
0
0
0
0
1
1
0
1
1
1
0
0
0
0
0
1
1
1
1
0
1
0
0
1
0
0
0
0
1
1
0
0
0
1
0
0
0
0
1
0
1
0
1
0
0
1
0
1
0
0
0
0
1
0
0
0
0
1
0
1
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
1
1
0
0
0
0
0
0
0
0
1
0
1
1
0
0
0
0
0
0
0
0
1
1
0
1
1
0
0
0
0
0
0
0
0
1
1
0
1
1
1
0
0
0
0
0
0
0
0
...

output:

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

result:

ok Queries used; 4485.

Test #195:

score: 0
Accepted
time: 20ms
memory: 3520kb

input:

0
0
0
1
0
0
0
1
0
0
0
0
1
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
1
1
0
0
0
1
0
0
0
1
0
0
0
1
1
0
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
1
1
0
1
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
1
1
1
0
1
1
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
1
1
1
1
0
1
1
1
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
0
0
1
0
...

output:

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

result:

ok Queries used; 4544.

Test #196:

score: 0
Accepted
time: 29ms
memory: 3480kb

input:

1
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
1
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
1
1
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
1
1
1
0
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
1
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
0
0
0
0
0
1
0
0
...

output:

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

result:

ok Queries used; 4628.

Test #197:

score: 0
Accepted
time: 37ms
memory: 3376kb

input:

0
0
0
0
1
0
0
0
0
0
1
0
1
1
0
0
0
0
0
1
1
0
1
1
1
0
0
0
0
0
1
1
1
0
1
1
1
1
0
0
0
0
0
1
1
1
1
1
0
1
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
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
1
1
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
...

output:

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

result:

ok Queries used; 4712.

Test #198:

score: 0
Accepted
time: 47ms
memory: 3432kb

input:

0
1
0
0
1
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
0
1
1
1
0
1
0
1
0
1
1
1
0
1
1
1
1
0
1
0
1
0
1
1
1
1
0
1
1
1
1
1
0
1
0
1
0
1
1
1
1
1
0
1
1
1
1
1
1
0
1
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
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
0
1
0
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
1
1
1
0
1
0
1
0
1
1
1
1
1
1
1
1
1
0
1
1
...

output:

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

result:

ok Queries used; 4950.

Test #199:

score: 0
Accepted
time: 50ms
memory: 3380kb

input:

0
1
0
0
1
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
1
1
0
0
0
0
0
0
0
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
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
1
1
0
1
1
1
1
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
1
0
1
0
1
0
1
1
0
1
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
0
1
0
1
0
0
1
0
0
0
1
0
1
0
0
0
0
0
0
0
...

output:

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

result:

ok Queries used; 4943.

Test #200:

score: 0
Accepted
time: 25ms
memory: 3448kb

input:

0
0
0
0
1
0
0
0
0
0
1
0
1
1
0
0
0
0
0
1
1
0
1
1
1
0
0
0
0
0
1
1
1
1
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
1
0
0
0
1
0
1
1
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
1
1
0
1
1
1
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
1
1
1
0
1
1
1
1
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
1
1
1
1
0
1
1
1
1
1
0
0
0
1
0
0
0
0
0
0
0
1
...

output:

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

result:

ok Queries used; 5044.

Test #201:

score: 0
Accepted
time: 18ms
memory: 3488kb

input:

0
0
0
0
1
0
0
0
0
0
1
0
1
1
0
0
0
0
0
1
1
0
1
1
1
0
0
0
0
0
1
1
1
0
1
1
1
1
0
0
0
0
0
1
1
1
1
0
1
1
1
1
1
0
0
0
0
0
1
1
1
1
1
1
0
0
0
1
0
0
1
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
1
0
0
0
0
0
1
0
1
1
0
0
0
0
0
1
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
1
0
0
0
0
...

output:

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

result:

ok Queries used; 5116.

Test #202:

score: 0
Accepted
time: 40ms
memory: 3524kb

input:

0
0
0
0
1
0
0
0
0
0
1
0
1
1
0
0
0
0
0
1
1
0
1
1
1
0
0
0
0
0
1
1
1
0
1
1
1
1
0
0
0
0
0
1
1
1
1
0
1
1
1
1
1
0
0
0
0
0
1
1
1
1
1
0
1
1
1
1
1
1
0
0
0
0
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
0
0
0
0
1
1
1
1
1
1
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
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
...

output:

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

result:

ok Queries used; 5203.

Test #203:

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

input:

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

output:

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

result:

ok Queries used; 5319.

Test #204:

score: 0
Accepted
time: 31ms
memory: 3424kb

input:

1
1
1
0
0
0
1
0
1
1
0
0
0
0
0
1
1
1
1
1
0
0
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
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
0
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
1
0
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
1
1
0
1
1
1
1
1
1
1
0
0
0
...

output:

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

result:

ok Queries used; 5367.

Test #205:

score: 0
Accepted
time: 29ms
memory: 3436kb

input:

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

output:

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

result:

ok Queries used; 5449.