QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#811845#9783. Duloc NetworkI_Love_Sonechka#WA 16ms4708kbC++202.8kb2024-12-13 03:28:592024-12-13 03:28:59

Judging History

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

  • [2024-12-13 03:28:59]
  • 评测
  • 测评结果:WA
  • 用时:16ms
  • 内存:4708kb
  • [2024-12-13 03:28:59]
  • 提交

answer

#include <complex.h>
#include <bits/stdc++.h>

#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define pi pair<int, int>
#define pb push_back

using namespace std;
using ll = long long;

template<typename T_container, typename T = typename enable_if
    <!is_same<T_container, string>::value, typename
    T_container::value_type>::type>

ostream& operator<<(ostream &os, const T_container &v) {
    os << '{';
    string sep;
    for(const T &x : v) {
        os << sep << x;
        sep = ", ";
    }
    return os << '}';
}


void dbg_out(){cerr<<endl;}
template <typename Head, typename... Tail>void dbg_out(Head H
    , Tail... T){cerr << ' ' << H; dbg_out(T...); }

#define dbg(...) dbg_out(__VA_ARGS__)

// #define TEST_CASES
#define vt vector

const int amax = 12;

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

void get() {
    int n = 200;
    double res = 0;
    for(int i = 1; i < n; ++i) {
        double P = 1;
        for(int j = 1; j <= i; ++j) {
            P /= i;
            res += P * j;
            P *= (i-1);
        }
    }
    cout << 2 * res << '\n';
}

const int MAX_QUERIES = 3500;

void solve() {
    int n; cin >> n;
    map<string, int> queries;
    auto Ask = [&](string s) -> int {
        if(queries.count(s)) {
            return queries[s];
        }
        if(queries.size() == MAX_QUERIES) {
            cout << "! " << rng() % 2 << endl;
            exit(0);
        }
        assert(queries.size() < MAX_QUERIES);
        cout << "? " << s << endl;
        fflush(stdout);
        int ret; cin >> ret;
        return queries[s] = ret;
    };
    string S;
    for(int i = 0; i < n; ++i) {
        S.push_back('0');
    }
    string T = S;
    S[rng()%n] = '1';
    for(int i = 1; i < n; ++i) {
        vt<int> other;
        for(int j = 0; j < n; ++j) if(S[j] == '0') {
            other.push_back(j);
        }
        int value = Ask(S);
        if(value == n - i) {
            break;
        }
        if(value == 0) {
            cout << "! 0" << endl;
            fflush(stdout);
            return ;
        }
        shuffle(other.begin(), other.end(), rng);
        for(auto u: other) {
            T[u] = '1';
            int u_value = Ask(T);
            T[u] = '0';
            S[u] = '1';
            int u_and_s = Ask(S);
            S[u] = '0';
            int s_value = Ask(S);
            int inter = s_value + u_value - u_and_s;
            if(inter != 0) {
                S[u] = '1';
                break;
            }
        }
    }
    cout << "! 1" << endl;
    fflush(stdout);
}

int main() {
    // cin.tie(0)->sync_with_stdio(0);
int tt = 1;
#ifdef TEST_CASES
    cin >> tt;
#endif
    while(tt--)
        solve();
    return 0;
}

詳細信息

Test #1:

score: 100
Accepted
time: 1ms
memory: 3808kb

input:

4
2
1
2

output:

? 0010
? 1000
? 1010
! 1

result:

ok Correct answer with 3 queries.

Test #2:

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

input:

2
0

output:

? 01
! 0

result:

ok Correct answer with 1 queries.

Test #3:

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

input:

4
2
3
2

output:

? 0010
? 0100
? 0110
! 1

result:

ok Correct answer with 3 queries.

Test #4:

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

input:

2
0

output:

? 10
! 0

result:

ok Correct answer with 1 queries.

Test #5:

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

input:

50
2
1
3
1
3
1
3
1
3
2
4
2
2
1
3
1
3
4
6
2
2
3
5
4
6
3
5
1
3
2
4
1
3
2
4
1
3
1
3
1
3
4
6
1
3
4
2
4
1
3
3
5
4
5
6
4
6
7
3
9
2
8
9
1
10
8
1
7
9
8
3
11
10
12
9
3
10
13
11
2
11
13
11
13
1
12
2
11
2
13
12
12
12
10
11
3
11
10
3
9
10
10
2
8
9
3
10
11
1
11
12
12
10
10
9
10
12
10
3
8
3
7
1
6
7
6
6
7
5
6
4
4
...

output:

? 00000000000000100000000000000000000000000000000000
? 00000000100000000000000000000000000000000000000000
? 00000000100000100000000000000000000000000000000000
? 00010000000000000000000000000000000000000000000000
? 00010000000000100000000000000000000000000000000000
? 000000000000000000000000000000000...

result:

ok Correct answer with 166 queries.

Test #6:

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

input:

50
7
8
13
13
22
10
28
13
29
11
32
9
33
11
36
9
37
6
36
13
35
14
34
10
34
10
34
10
33
15
33
13
32
15
31
10
31

output:

? 00000000000000000000000000000000000000000000100000
? 00000000000000000000000100000000000000000000000000
? 00000000000000000000000100000000000000000000100000
? 00000000000000000000000000010000000000000000000000
? 00000000000000000000000100010000000000000000100000
? 000000000000000000000000001000000...

result:

ok Correct answer with 37 queries.

Test #7:

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

input:

50
1
3
3
1
4
3
6
5
8
2
5
1
4
3
6
3
5
1
6
1
6
2
4
4
5
1
6
6
3
8
1
6
1
6
3
8
3
4
4
6
7
7
9
1
7
7
1
7
1
7
1
7
4
9
2
11
10
10
2
9
3
11
12
3
13
13
1
14
3
16
4
13
2
12
15
2
14
11
10
3
9
1
10
8
2
10
9
9
11
9
4
8
9
2
7
8
9
1
8
8
1
8
8
1
6
7
7
8
8
6
8
9
8
1
7
9
11
3
8
1
7
8
8
8
8
1
7
8
6
7
1
7
5
6
2
6
5
5
6
...

output:

? 00000100000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000010000000000
? 00000100000000000000000000000000000000010000000000
? 00000000000010000000000000000000000000000000000000
? 00000100000010000000000000000000000000010000000000
? 000000000000000000000000000000000...

result:

ok Correct answer with 166 queries.

Test #8:

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

input:

50
8
10
14
6
17
14
24
9
27
11
32
8
32
12
35
5
35
8
36
9
36
8
35
7
34
9
33
7
33
5
33
10
33

output:

? 00000001000000000000000000000000000000000000000000
? 00000000000100000000000000000000000000000000000000
? 00000001000100000000000000000000000000000000000000
? 00000000000000000000000000001000000000000000000000
? 00000001000100000000000000001000000000000000000000
? 010000000000000000000000000000000...

result:

ok Correct answer with 33 queries.

Test #9:

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

input:

50
1
1
2
2
2
2
4
1
3
2
4
3
1
3
1
2
2
4
1
3
1
3
1
3
2
4
1
3
1
3
3
2
4
1
3
1
3
1
3
1
3
2
4
3
5
1
3
1
3
1
3
1
3
1
3
1
3
1
3
2
4
1
3
4
2
4
1
3
3
5
4
3
3
5
1
3
3
5
1
3
2
4
1
3
1
3
3
5
1
3
3
3
5
2
4
1
3
3
1
2
1
0

output:

? 00000000001000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000010000000
? 00000000001000000000000000000000000000000010000000
? 00000000000000000000000000000001000000000000000000
? 00000000001000000000000000000001000000000000000000
? 000000000000000000000000000000000...

result:

ok Correct answer with 102 queries.

Test #10:

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

input:

100
2
2
4
1
3
1
3
2
4
3
5
1
3
2
4
2
4
3
5
1
3
1
3
1
3
2
4
3
5
1
3
1
2
1
3
4
1
3
1
3
1
3
1
3
4
6
1
3
1
3
4
2
4
5
7
1
3
1
3
4
6
2
4
2
4
3
5
2
4
2
4
3
5
2
4
1
3
2
4
1
3
1
3
1
3
1
3
1
3
3
5
1
3
3
2
4
2
4
5
7
1
3
5
2
4
1
3
2
4
3
5
1
3
3
4
1
3
3
1
3
1
3
3
5
2
4
5
4
5
2
7
3
8
7
2
7
1
6
7
6
3
7
1
8
1
8
9
10...

output:

? 0000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000
? 0000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000
? 00000000000000000000000010000000000000000000000000000000000000000000010000000000000000000000...

result:

ok Correct answer with 546 queries.

Test #11:

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

input:

100
11
11
19
10
28
12
37
11
46
13
52
6
54
7
56
5
57
6
59
8
60
7
62
9
65
11
67
10
71
5
71
10
71
6
71
16
72
16
73
8
73
11
72
8
72
8
71
10
70
10
70
9
70
10
69
12
69
13
68
11
68
11
67
9
66
9
65
7
65

output:

? 0000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000100010000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 69 queries.

Test #12:

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

input:

100
2
3
5
2
4
5
7
3
5
3
4
6
10
4
7
2
9
10
3
10
3
9
2
11
1
10
3
9
10
3
12
5
14
12
12
6
15
5
14
2
11
3
12
3
12
5
14
4
13
4
13
5
14
7
15
3
18
17
6
20
25
3
22
2
22
7
27
8
31
5
33
4
33
34
35
1
35
3
36
4
38
3
41
2
39
2
38
3
39
39
42
5
44
6
46
2
48
5
48
2
48
5
48
5
48
3
48
4
48
4
49
1
49
4
48
2
49
52
1
48
...

output:

? 0000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000
? 00001000000000000000000000000000000000000000000000001000000000000000000000000000000000000000...

result:

ok Correct answer with 185 queries.

Test #13:

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

input:

100
3
1
4
1
4
1
4
2
5
1
4
2
5
1
4
1
4
1
4
1
4
2
5
2
5
3
6
4
7
2
5
1
4
1
4
4
7
1
4
4
7
1
4
1
4
2
5
4
7
1
4
2
5
1
4
3
6
3
6
4
7
1
4
1
4
1
4
2
5
1
4
1
4
3
6
5
8
2
3
6
2
5
2
5
1
4
1
4
5
1
4
4
1
4
1
4
2
5
1
4
4
7
7
8
1
4
2
4
5
5
3
1
2
1
3
1
3
3
3
5
6
1
7
1
6
7
2
6
10
7
1
5
1
6
1
6
6
1
6
8
2
7
2
7
1
6
6
6...

output:

? 0000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000
? 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000
? 00000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000...

result:

ok Correct answer with 429 queries.

Test #14:

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

input:

100
2
1
3
1
3
2
4
1
3
1
3
2
4
2
4
1
3
3
3
3
6
1
4
1
4
1
4
1
4
3
6
1
4
1
4
1
4
2
5
3
6
4
4
1
4
1
2
2
4
2
4
4
3
2
4
1
3
1
3
1
3
2
4
1
3
3
2
4
3
5
1
3
5
1
3
1
3
3
5
2
4
1
3
3
2
4
1
3
3
3
1
3
5
7
2
4
1
3
4
1
3
2
4
4
6
1
3
1
3
1
3
1
3
3
1
3
1
3
4
6
4
3
5
1
3
3
4
1
1
3
4
3
4
2
3
4
3
2
2
3
3
4
2
2
3
4
3
1
...

output:

? 0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000
? 0000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000001000000000000000000000000000010000000000000000000000000000...

result:

ok Correct answer with 328 queries.

Test #15:

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

input:

150
4
2
6
2
5
7
5
9
3
12
4
12
2
14
1
13
4
15
3
18
3
17
4
21
18
1
18
2
17
3
19
20
3
20
4
22
1
23
4
26
4
24
1
23
4
24
1
25
2
26
5
27
30
3
33
1
31
3
32
2
34
1
33
1
33
34
4
35
36
2
37
3
35
3
38
3
35
3
37
2
36
2
38
36
4
38
6
39
1
38
2
37
2
39
40
4
40
2
42
4
41
45
2
42
1
43
1
43
1
43
44
2
44
2
41
42
5
44
...

output:

? 000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000
? 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 321 queries.

Test #16:

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

input:

150
1
1
2
2
3
5
6
6
7
3
4
3
4
2
3
3
4
2
3
1
2
3
4
2
3
3
4
1
2
2
3
2
3
4
5
2
3
4
5
2
3
3
4
2
3
5
6
3
4
3
4
6
7
4
5
1
2
3
4
2
3
3
4
2
3
3
4
3
4
4
5
3
4
7
8
4
5
2
3
3
2
4
6
3
5
6
8
2
4
3
5
3
5
6
1
3
4
6
1
3
1
3
2
4
1
3
2
4
2
4
8
2
4
2
4
4
5
2
4
1
3
3
3
5
3
5
5
7
4
6
3
5
5
7
2
4
4
3
5
7
1
3
4
7
3
7
6
1
...

output:

? 000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 396 queries.

Test #17:

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

input:

150
2
2
4
1
3
1
3
4
6
2
4
1
3
3
5
3
5
3
5
1
3
1
3
3
5
2
4
1
3
2
4
4
6
4
6
4
6
4
6
2
4
4
6
1
3
5
7
3
5
1
3
3
5
1
3
2
4
1
3
3
5
3
5
1
3
6
8
1
3
3
5
2
4
5
6
2
8
8
1
7
3
9
4
10
1
7
2
8
9
1
7
3
9
1
7
2
8
9
4
13
2
11
2
10
12
13
9
2
11
1
10
1
10
10
1
10
1
10
3
9
5
12
14
2
11
14
12
13
2
13
2
13
12
2
13
1
14...

output:

? 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000
? 0000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 448 queries.

Test #18:

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

input:

150
8
2
10
2
10
3
11
3
11
1
9
1
9
5
12
3
15
1
13
3
14
1
15
4
18
3
17
1
15
2
16
1
15
2
16
1
15
2
16
2
16
2
14
2
16
5
19
2
16
3
17
5
18
19
1
19
2
18
5
22
1
23
25
4
29
3
28
26
5
26
2
28
4
29
3
32
5
31
2
32
4
34
35
35
3
35
3
38
37
5
38
1
39
2
39
2
40
2
42
2
41
2
43
44
1
45
1
44
4
44
3
44
45
46
3
44
3
47...

output:

? 000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 377 queries.

Test #19:

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

input:

150
1
1
2
1
2
2
3
2
3
1
2
1
1
5
6
1
2
1
2
2
3
2
3
2
3
1
2
1
2
2
3
2
3
3
4
2
3
1
2
2
3
1
2
1
2
1
2
2
3
1
2
3
4
2
3
1
2
1
2
2
3
1
2
3
4
1
2
2
3
3
4
1
2
2
3
2
3
3
4
1
2
3
4
1
2
1
2
2
3
2
3
2
3
2
3
1
2
3
4
1
2
1
2
3
4
2
3
1
2
1
2
2
5
6
2
3
1
2
3
3
2
5
3
6
2
5
1
4
4
5
5
1
4
2
5
1
4
4
7
6
5
4
1
4
5
4
4
4
...

output:

? 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000
? 0000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 1021 queries.

Test #20:

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

input:

200
1
2
3
1
2
4
5
1
2
2
3
1
2
5
6
1
2
2
3
2
3
1
2
1
2
2
3
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
3
4
3
4
4
5
1
2
1
2
1
2
1
2
1
2
3
4
1
2
1
2
1
2
3
4
1
2
1
2
1
2
1
2
2
3
1
2
1
2
1
2
1
2
1
2
1
2
1
2
2
3
1
2
1
2
2
3
1
2
1
2
1
2
1
2
2
3
1
2
1
2
1
2
2
3
1
2
2
3
1
2
1
2
5
6
1
2
2
3
1
2
3
4
2
3
1
2
1
...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 221 queries.

Test #21:

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

input:

200
5
3
7
1
8
2
9
1
8
1
8
2
9
1
8
3
10
1
8
4
11
2
9
2
9
3
10
1
8
2
9
2
9
5
12
1
8
1
8
2
9
1
8
3
10
1
8
1
8
1
8
2
9
2
9
1
8
1
8
2
9
2
9
1
8
2
8
2
10
2
10
2
10
3
11
9
1
9
2
10
1
8
2
10
9
3
11
1
9
2
10
1
9
1
9
2
10
1
9
1
8
3
11
2
10
2
10
1
9
1
9
1
9
10
4
12
3
11
9
2
10
9
11
2
10
5
13
1
9
2
10
3
11
2
10...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010...

result:

ok Correct answer with 1106 queries.

Test #22:

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

input:

200
3
3
6
1
4
1
4
2
5
2
5
1
4
2
5
3
6
1
4
1
4
2
5
4
7
1
4
3
6
1
4
1
4
1
4
1
4
1
4
2
5
1
4
2
5
2
5
3
6
3
6
1
4
1
4
3
5
2
7
2
7
2
7
3
8
6
2
7
3
8
6
1
6
1
6
1
6
2
7
2
7
1
6
1
6
1
6
1
6
4
9
1
6
2
7
7
2
7
1
6
2
5
2
7
1
6
1
6
6
3
8
6
6
1
6
3
6
2
8
8
1
7
3
9
3
8
9
2
10
10
3
11
1
9
3
11
1
9
9
9
1
9
1
9
1
8
...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 1438 queries.

Test #23:

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

input:

200
1
2
3
4
5
3
4
2
3
1
2
1
2
1
2
3
4
3
4
2
3
2
3
1
2
4
5
2
3
1
2
2
3
1
2
3
4
2
3
4
3
2
5
3
6
4
7
1
4
3
6
1
4
1
4
2
5
2
5
2
5
2
5
3
6
1
4
3
6
4
4
2
5
3
6
2
5
2
5
1
4
4
7
2
5
2
5
1
4
1
4
3
6
2
5
2
5
1
4
2
5
4
6
4
7
1
4
2
5
2
5
2
5
1
4
1
4
2
5
2
5
3
6
3
6
3
6
2
5
5
1
3
5
1
4
6
3
6
1
4
3
6
1
4
1
4
4
1
...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010
? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 1074 queries.

Test #24:

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

input:

200
5
2
7
2
7
4
9
2
7
4
9
3
8
4
9
1
6
3
8
2
7
2
7
2
7
3
8
2
7
3
8
2
7
4
9
3
8
2
7
1
6
1
5
2
7
1
6
3
8
2
7
4
8
2
10
4
10
2
12
1
11
3
13
2
12
2
12
4
14
3
13
3
13
1
11
2
11
15
6
17
2
13
3
13
15
4
17
3
15
3
18
6
21
5
20
5
19
25
1
19
4
22
4
22
5
24
1
25
3
26
1
27
1
27
2
27
31
3
34
2
32
5
35
2
37
37
36
37...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 432 queries.

Test #25:

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

input:

200
3
4
7
7
10
6
8
6
14
1
9
2
10
12
4
11
7
16
7
22
5
26
4
28
2
30
6
33
1
34
3
33
38
2
40
2
38
3
39
2
41
1
39
6
44
1
45
8
52
5
47
3
49
3
51
2
52
1
51
3
51
6
57
1
51
4
55
3
52
3
52
3
55
4
55
4
58
2
59
60
3
61
4
61
7
63
66
7
70
4
73
1
73
3
74
9
80
2
80
7
86
5
87
5
87
4
88
1
87
10
91
2
93
2
91
4
91
7
92...

output:

? 00000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000...

result:

ok Correct answer with 354 queries.

Test #26:

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

input:

200
6
4
10
6
11
3
13
4
17
5
16
5
21
6
20
8
27
5
32
3
28
4
31
3
32
2
33
4
36
1
37
1
37
4
38
42
42
6
43
3
46
3
45
4
49
6
49
4
49
5
51
6
54
6
57
9
65
4
68
5
71
7
73
6
76
3
78
6
79
9
82
4
83
6
85
7
89
5
89
5
90
4
91
3
91
7
93
8
94
5
96
6
98
5
97
9
96
6
100
8
103
7
104
4
105
2
105
1
104
9
107
4
106
2
106...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000...

result:

ok Correct answer with 421 queries.

Test #27:

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

input:

200
5
1
6
3
8
6
11
4
8
5
13
1
9
3
11
9
16
19
4
20
3
19
5
21
4
19
6
25
2
21
6
25
5
24
2
19
5
20
8
26
3
29
27
3
29
2
28
32
6
28
5
33
1
29
6
34
4
32
3
31
6
31
5
36
3
34
6
37
33
3
31
4
35
1
31
3
34
4
32
1
31
1
32
8
38
2
40
43
5
42
4
44
6
47
5
50
3
51
54
3
54
3
54
4
52
4
54
5
56
6
59
4
61
62
3
65
2
64
2
...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 461 queries.

Test #28:

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

input:

200
3
5
8
4
7
6
9
2
5
2
5
4
7
6
9
3
6
9
12
3
6
6
9
6
9
5
8
5
8
5
8
2
5
5
7
7
14
4
11
16
2
9
10
17
3
10
6
12
4
16
3
15
6
18
5
17
2
14
3
14
2
16
6
19
3
21
24
2
26
6
29
5
34
35
6
33
4
35
5
38
5
41
2
43
3
42
5
44
45
48
2
47
10
56
3
58
4
61
65
68
70
3
70
6
75
5
77
2
77
78
6
79
85
9
88
4
89
4
88
88
5
89
3...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 436 queries.

Test #29:

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

input:

200
5
3
8
5
10
3
8
3
8
3
8
4
9
3
8
4
9
6
10
4
14
6
14
3
17
4
18
2
16
3
16
6
22
5
21
3
19
4
18
6
22
4
26
5
27
2
24
4
26
9
31
3
25
3
25
2
22
3
25
7
29
5
27
3
25
5
26
2
28
5
31
5
29
5
34
5
32
5
36
7
42
2
44
9
51
3
43
6
49
6
45
3
47
4
50
4
53
55
57
59
5
61
10
64
3
65
7
66
1
67
2
66
69
73
2
72
6
75
4
75
...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100
? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 388 queries.

Test #30:

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

input:

200
1
1
2
5
6
3
4
3
4
3
4
1
2
5
6
3
4
3
4
2
3
2
3
1
2
2
3
2
3
2
3
1
2
4
5
2
3
1
2
1
2
1
2
2
3
1
2
2
3
3
4
1
2
1
2
1
2
3
4
3
4
2
3
4
5
2
3
2
3
1
2
3
4
1
2
3
4
2
3
3
4
1
2
2
3
2
3
2
3
1
2
3
4
2
3
3
4
1
2
2
3
1
2
3
4
1
2
2
3
2
3
2
3
1
2
4
5
2
3
2
3
2
3
1
2
1
2
1
2
2
3
3
4
1
2
1
2
1
2
2
3
2
3
3
4
1
2
2
...

output:

? 00000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 1301 queries.

Test #31:

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

input:

200
2
1
3
3
5
1
3
2
4
4
6
2
4
2
4
3
5
2
4
2
4
1
3
1
3
2
4
2
4
1
3
1
3
1
3
4
6
3
5
1
3
1
3
2
4
3
5
2
4
2
4
2
4
2
4
1
3
1
3
3
5
3
5
3
5
1
3
1
3
3
5
1
3
3
5
2
4
2
4
2
4
2
4
2
4
2
4
3
5
2
4
1
3
2
4
2
4
6
8
1
3
2
4
1
3
4
6
4
6
2
4
2
4
3
5
2
4
3
5
3
5
2
4
2
4
2
4
2
4
3
5
2
4
1
3
3
5
2
4
3
5
1
3
2
4
2
4
3
...

output:

? 00000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000...

result:

ok Correct answer with 1233 queries.

Test #32:

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

input:

200
2
1
3
1
3
4
6
1
3
1
3
1
3
1
3
3
5
2
4
1
3
2
4
3
5
1
3
2
4
1
3
1
3
1
3
2
4
1
3
1
3
2
4
3
5
2
4
2
4
3
5
2
4
1
3
2
4
2
4
3
5
1
3
1
3
1
3
2
4
5
7
2
4
3
5
1
3
2
4
1
3
2
4
1
3
2
4
2
4
3
5
1
3
1
3
3
5
2
4
1
3
1
3
1
3
2
4
2
4
2
4
2
4
1
3
1
3
1
3
3
5
1
3
1
3
1
3
1
3
4
6
1
3
3
5
1
3
4
6
1
3
1
3
2
4
1
3
3
...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000...

result:

ok Correct answer with 1412 queries.

Test #33:

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

input:

200
1
1
2
1
2
3
4
3
4
2
3
1
2
1
2
1
2
1
2
1
2
3
4
2
3
1
2
1
2
1
2
2
3
1
2
1
2
2
3
1
2
2
3
2
3
2
3
1
2
3
4
4
5
1
2
4
5
3
4
4
5
1
2
1
2
3
4
2
3
1
2
4
5
3
4
3
4
1
2
1
2
5
6
3
4
2
3
1
2
1
2
3
4
1
2
3
4
1
2
3
4
1
2
1
2
2
3
2
3
3
4
1
2
3
4
3
4
2
3
2
3
1
2
3
4
1
2
1
2
1
2
3
4
1
2
5
6
2
3
2
3
3
4
2
3
2
3
1
...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000
? 00000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000...

result:

ok Correct answer with 1492 queries.

Test #34:

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

input:

200
3
5
8
2
5
3
6
2
5
1
4
1
4
2
5
2
5
1
4
1
4
2
5
3
6
4
7
2
5
2
5
2
5
1
4
3
6
3
6
2
5
1
4
2
5
1
4
3
6
2
5
3
6
1
4
1
4
3
6
3
6
1
4
2
5
2
5
2
5
1
4
1
4
4
5
1
6
8
2
7
3
8
2
5
2
7
2
7
6
1
6
1
6
3
8
7
3
7
3
10
8
1
8
2
9
3
10
10
3
10
9
1
8
3
10
1
8
9
1
8
2
9
2
9
3
10
2
9
2
9
1
8
8
4
11
2
9
3
10
1
8
4
11
3...

output:

? 00000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000...

result:

ok Correct answer with 1728 queries.

Test #35:

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

input:

200
2
1
3
3
5
2
4
3
5
3
5
3
5
3
5
3
5
3
5
1
3
3
5
2
4
2
4
2
4
2
4
2
4
3
5
2
4
3
5
3
5
2
4
2
4
2
4
3
5
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
3
5
3
5
3
4
3
7
2
6
3
7
3
7
2
6
2
6
6
3
7
2
6
2
6
2
6
7
3
7
7
3
7
2
6
2
6
2
6
2
6
3
7
2
6
6
2
6
2
6
1
5
3
7
3
4
7
3
7
2
6
2
6
2
6
6
2
6
7
1
5
2
6
2
6
6
2
6
2
6
6
3
7
...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 791 queries.

Test #36:

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

input:

200
2
2
4
2
4
2
4
3
5
2
4
2
4
2
4
2
4
2
4
3
5
2
4
3
5
2
4
2
4
2
4
2
3
2
5
3
6
5
3
6
2
5
2
5
2
5
2
5
3
6
2
5
3
6
3
6
3
6
3
6
2
5
1
4
5
2
5
3
6
2
5
3
6
3
6
3
5
8
3
8
3
8
3
8
3
8
3
8
2
7
2
7
3
8
2
7
7
7
2
7
3
8
2
7
2
7
2
7
3
8
7
2
7
8
2
7
2
7
2
7
8
2
7
2
7
3
8
2
7
1
6
3
8
7
3
7
2
9
2
9
3
10
3
10
3
10
2...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000...

result:

ok Correct answer with 982 queries.

Test #37:

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

input:

200
2
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
3
2
5
2
5
2
5
2
5
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
4
2
6
2
6
6
2
6
2
6
2
6
2
6
6
6
2
6
2
6
6
2
6
6
2
6
2
...

output:

? 00000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 3390 queries.

Test #38:

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

input:

200
2
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
2
2
4
2
4
2
4
2
4
2
4
2
4
2
4
4
2
4
4
4
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
4
2
4
2
4
2
4
...

output:

? 00000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 3289 queries.

Test #39:

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

input:

200
2
3
5
3
5
2
4
2
4
1
3
3
5
2
4
2
4
2
4
1
3
2
4
2
4
2
4
1
3
2
4
2
4
3
5
2
4
2
4
2
4
2
4
1
3
1
3
2
4
2
4
3
5
1
3
3
5
5
7
1
3
1
3
1
3
1
3
2
4
2
4
1
3
1
3
3
5
2
4
2
4
1
3
4
6
1
3
2
4
1
3
1
3
1
3
1
3
2
4
1
3
1
3
3
5
2
4
2
4
1
3
3
5
2
4
1
3
3
5
1
3
5
7
2
4
1
3
1
3
2
4
2
4
2
4
2
4
2
4
1
3
2
4
1
3
2
4
1
...

output:

? 00100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000...

result:

ok Correct answer with 1335 queries.

Test #40:

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

input:

200
1
1
2
1
2
4
5
3
4
2
3
4
5
2
3
1
2
1
2
4
5
2
3
1
2
2
3
2
3
1
2
3
4
1
2
2
3
2
3
3
4
1
2
2
3
3
4
1
2
4
5
2
3
5
6
2
3
1
2
2
3
2
3
1
2
3
4
1
2
3
4
2
3
1
2
2
3
1
2
3
4
2
3
1
2
4
5
3
4
4
5
2
3
1
2
2
3
2
3
2
3
2
3
1
2
1
2
3
4
2
3
4
5
1
2
1
2
1
2
1
2
3
4
2
3
1
2
2
3
3
4
2
3
1
2
2
1
3
4
2
3
3
2
3
2
1
2
1
...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000
? 00000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000...

result:

ok Correct answer with 1753 queries.

Test #41:

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

input:

200
2
1
3
1
3
2
4
2
4
1
3
3
5
2
4
1
3
1
3
3
4
3
7
1
5
3
7
4
8
3
7
2
6
2
6
2
4
1
5
1
5
2
6
4
8
2
6
1
4
2
6
1
5
1
5
1
5
1
5
2
5
1
6
8
1
6
2
7
1
6
1
6
1
6
2
7
2
7
1
6
2
7
2
7
7
1
6
5
6
1
6
5
10
6
8
2
7
3
8
1
6
1
6
1
6
7
3
6
1
7
2
8
2
8
7
2
8
2
8
2
8
1
6
2
6
5
8
6
14
9
3
11
1
9
13
2
10
1
7
1
8
9
2
9
1
8...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000
? 00000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 1381 queries.

Test #42:

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

input:

200
2
4
6
1
3
4
6
2
4
2
4
3
5
3
5
4
6
2
4
1
3
2
4
3
5
1
3
4
6
2
4
2
4
1
3
1
3
4
6
2
4
2
4
1
3
1
3
1
3
1
3
2
4
2
4
1
3
2
4
3
5
1
3
1
3
1
3
3
5
4
6
4
6
1
3
1
3
2
3
2
5
6
3
6
2
5
2
5
4
1
4
1
4
4
2
5
1
4
2
5
1
4
3
6
1
4
4
4
4
8
1
5
2
6
4
8
1
5
3
7
6
5
1
5
5
9
4
8
3
6
1
7
1
7
8
2
8
2
6
7
4
10
8
2
7
9
5
1...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000
? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 935 queries.

Test #43:

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

input:

200
3
3
6
1
4
1
4
1
4
1
4
1
4
2
5
3
6
2
5
1
4
1
4
3
6
2
5
3
6
1
4
2
5
2
5
2
5
1
4
1
4
2
5
2
5
4
7
1
4
1
4
1
3
2
5
1
4
2
5
3
6
2
5
3
6
3
6
2
5
2
5
2
5
2
5
4
2
5
4
7
2
5
1
4
2
5
2
5
5
3
6
4
7
2
5
1
4
1
4
1
4
1
4
1
4
2
5
3
6
2
5
3
6
1
4
2
5
2
5
6
1
4
1
3
4
4
2
5
4
2
5
5
2
5
1
4
2
5
4
1
4
5
4
4
2
5
6
2
...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000
? 00000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 1327 queries.

Test #44:

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

input:

200
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

output:

? 00000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 211 queries.

Test #45:

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

input:

200
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 405 queries.

Test #46:

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

input:

200
1
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
20
21
1
2
1
1
1
2
1
2
1
1
1
1
1
2
1
2
1
2
16
16
1
15
1
16
1
16
1
16
1
14
11
25
1
15
1
15
1
15
1
15
1
15
1
15
1
15
1
15
1
15
1
15
15
1
14
1
15
15
1
15
1
15
1
13
1
14
1
14
1
14
1
14
1
14
14
1
12
1
13
1
13
1
11
1
12
12
12
1
12
22
33
1
12...

output:

? 00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 1003 queries.

Test #47:

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

input:

200
1
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
17
18
1
2
1
1
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
13
13
1
12
13
1
13
1
13
1
13
1
13
1
13
1
13
1
13
1
13
1
13
1
13
13
25
13
1
13
1
12
1
13
1
13
1
13
17
29
15
27
13
13
1
13
13
1
13
1
13
1
13
1
13
1
12...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000...

result:

ok Correct answer with 739 queries.

Test #48:

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

input:

200
2
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 3500 queries.

Test #49:

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

input:

200
2
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
3
2
5
2
5
2
5
2
5
5
2
5
2
5
2
5
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
5
2
5
2
5
2
5
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
5
2
5
...

output:

? 00000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 3273 queries.

Test #50:

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

input:

200
2
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
3
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
1
4
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000
? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 3135 queries.

Test #51:

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

input:

200
2
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
2
2
4
2
4
2
4
2
4
2
4
4
2
4
2
4
4
2
4
2
4
2
4
2
4
4
2
4
2
4
1
3
2
4
2
4
2
4
2
3
2
5
2
5
2
5
2
5
2
5
2
5
2
5
5
5
2
5
5
5
5
2
5
5
2
5
5
2
5
2
5
5
2
5
2
5
5
2
5
5
...

output:

? 00000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 3479 queries.

Test #52:

score: -100
Wrong Answer
time: 15ms
memory: 4596kb

input:

200
1
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
1
2
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
3
2
...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000
? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

wrong answer Wrong answer.