QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#140874#5156. Going in CirclesGamal74WA 23ms3600kbC++202.4kb2023-08-16 22:00:482023-08-16 22:01:11

Judging History

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

  • [2023-08-16 22:01:11]
  • 评测
  • 测评结果:WA
  • 用时:23ms
  • 内存:3600kb
  • [2023-08-16 22:00:48]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define EPS 1e-9
#define all(x) x.begin(),x.end()
#define allr(x) x.rbegin(),x.rend()
#define yes cout << "YES" << '\n';
#define no cout << "NO" << '\n';
#define mem(arrr, xx) memset(arrr,xx,sizeof arrr)
#define PI acos(-1)
#define Ones(n) __builtin_popcount(n)
#define Onesl(n) __builtin_popcountll(n)
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
const ll MOD = 1e9 + 7;
const ll N = 2e5 + 5;
const int OO = 0x3f3f3f3f;
const ll LOO = 0x3f3f3f3f3f3f3f3f;
int dx8[] = {+0, +0, -1, +1, +1, +1, -1, -1};
int dy8[] = {-1, +1, +0, +0, +1, -1, +1, -1};
int dx4[] = {+0, +0, -1, +1};
int dy4[] = {-1, +1, +0, +0};

void Fast() {
    cin.tie(nullptr), cout.tie(nullptr), cin.sync_with_stdio(false), cout.sync_with_stdio(false);
#ifdef Clion
    freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout);
#endif
}

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int ask(const string &s){
    cout << "? " << s << endl;
    int ret;
    cin >> ret;
    return ret;
}
void Solution() {
    int x;
    cin >> x;
    vector<int> values;
    for (int i = 0; i < 100; ++i) {
        values.push_back(x);
        int cur = rng() % 2;
        if(ask("right") != cur) ask("flip");
        x = cur;
    }
    bool ok = false;
    for (int i = 0; i < 100; ++i) {
        int cur = ask("left");
        if(cur != values.back()) ok = true;
        values.pop_back();
        x = cur;
    }
    if(ok){
        for (int i = 0; i < 100; ++i) {
            if(x)ask("flip");
            x = ask("right");
        }
        ask("flip");
        int n = 1;
        while (true){
            if(ask("right")){
                cout << "! " << n << endl;
                return;
            }
            n++;
        }
    }
    else{
        deque<int> taken, nw;
        for (int i = 0; i < 100; ++i) {
            taken.push_back(x);
            x = ask("right");
        }
        int n = 1;
        while (true){
            nw.push_back(x);
            x = ask("right");
            if(nw.size() > 100) nw.pop_front();
            if(nw == taken){
                cout << "! " << n << endl;
                return;
            }
            n++;
        }
    }
}

int main() {
    Fast();
    int T = 1;
//    cin >> T;
    while (T--) {
        Solution();
    }
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

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

output:

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

result:

ok Queries used; 5345.

Test #2:

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

input:

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

output:

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

result:

ok Queries used; 5199.

Test #3:

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

input:

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

output:

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

result:

ok Queries used; 5347.

Test #4:

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

input:

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

output:

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

result:

ok Queries used; 4443.

Test #5:

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

input:

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

output:

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

result:

ok Queries used; 4442.

Test #6:

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

input:

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

output:

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

result:

ok Queries used; 4454.

Test #7:

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

input:

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

output:

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

result:

ok Queries used; 5347.

Test #8:

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

input:

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

output:

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

result:

ok Queries used; 5208.

Test #9:

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

input:

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

output:

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

result:

ok Queries used; 5353.

Test #10:

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

input:

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

output:

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

result:

ok Queries used; 4447.

Test #11:

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

input:

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

output:

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

result:

ok Queries used; 4444.

Test #12:

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

input:

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

output:

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

result:

ok Queries used; 4455.

Test #13:

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

input:

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

output:

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

result:

ok Queries used; 419.

Test #14:

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

input:

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

output:

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

result:

ok Queries used; 2042.

Test #15:

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

input:

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

output:

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

result:

ok Queries used; 3555.

Test #16:

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

input:

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

output:

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

result:

ok Queries used; 5246.

Test #17:

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

input:

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

output:

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

result:

ok Queries used; 5174.

Test #18:

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

input:

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

output:

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

result:

ok Queries used; 5161.

Test #19:

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

input:

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

output:

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

result:

ok Queries used; 5176.

Test #20:

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

input:

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

output:

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

result:

ok Queries used; 5267.

Test #21:

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

input:

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

output:

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

result:

ok Queries used; 5345.

Test #22:

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

input:

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

output:

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

result:

ok Queries used; 4873.

Test #23:

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

input:

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

output:

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

result:

ok Queries used; 5075.

Test #24:

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

input:

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

output:

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

result:

ok Queries used; 5231.

Test #25:

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

input:

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

output:

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

result:

ok Queries used; 4776.

Test #26:

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

input:

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

output:

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

result:

ok Queries used; 5245.

Test #27:

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

input:

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

output:

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

result:

ok Queries used; 5263.

Test #28:

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

input:

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

output:

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

result:

ok Queries used; 4341.

Test #29:

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

input:

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

output:

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

result:

ok Queries used; 357.

Test #30:

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

input:

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

output:

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

result:

ok Queries used; 353.

Test #31:

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

input:

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

output:

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

result:

ok Queries used; 363.

Test #32:

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

input:

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

output:

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

result:

ok Queries used; 365.

Test #33:

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

input:

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

output:

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

result:

ok Queries used; 359.

Test #34:

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

input:

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

output:

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

result:

ok Queries used; 363.

Test #35:

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

input:

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

output:

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

result:

ok Queries used; 371.

Test #36:

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

input:

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

output:

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

result:

ok Queries used; 361.

Test #37:

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

input:

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

output:

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

result:

ok Queries used; 501.

Test #38:

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

input:

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

output:

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

result:

ok Queries used; 1117.

Test #39:

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

input:

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

output:

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

result:

ok Queries used; 2320.

Test #40:

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

input:

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

output:

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

result:

ok Queries used; 4056.

Test #41:

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

input:

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

output:

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

result:

ok Queries used; 4451.

Test #42:

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

input:

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

output:

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

result:

ok Queries used; 5345.

Test #43:

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

input:

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

output:

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

result:

ok Queries used; 5355.

Test #44:

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

input:

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

output:

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

result:

ok Queries used; 362.

Test #45:

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

input:

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

output:

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

result:

ok Queries used; 359.

Test #46:

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

input:

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

output:

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

result:

ok Queries used; 348.

Test #47:

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

input:

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

output:

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

result:

ok Queries used; 361.

Test #48:

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

input:

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

output:

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

result:

ok Queries used; 366.

Test #49:

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

input:

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

output:

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

result:

ok Queries used; 361.

Test #50:

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

input:

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

output:

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

result:

ok Queries used; 362.

Test #51:

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

input:

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

output:

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

result:

ok Queries used; 371.

Test #52:

score: -100
Wrong Answer
time: 0ms
memory: 3480kb

input:

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

output:

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

result:

wrong answer Wrong answer: incorrect guess 198 (ans: 99). Queries used: 552