QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#811847#9783. Duloc NetworkI_Love_Sonechka#WA 12ms4876kbC++202.8kb2024-12-13 03:29:212024-12-13 03:29:23

Judging History

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

  • [2024-12-13 03:29:23]
  • 评测
  • 测评结果:WA
  • 用时:12ms
  • 内存:4876kb
  • [2024-12-13 03:29:21]
  • 提交

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: 0ms
memory: 3608kb

input:

4
2
2
1
1
1

output:

? 0010
? 0001
? 0011
? 1000
? 1011
! 1

result:

ok Correct answer with 5 queries.

Test #2:

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

input:

2
0

output:

? 01
! 0

result:

ok Correct answer with 1 queries.

Test #3:

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

input:

4
3

output:

? 0100
! 1

result:

ok Correct answer with 1 queries.

Test #4:

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

input:

2
0

output:

? 01
! 0

result:

ok Correct answer with 1 queries.

Test #5:

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

input:

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

output:

? 00001000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000001000000000
? 00001000000000000000000000000000000000001000000000
? 00000000000100000000000000000000000000000000000000
? 00001000000100000000000000000000000000001000000000
? 000000000000000000100000000000000...

result:

ok Correct answer with 169 queries.

Test #6:

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

input:

50
8
14
20
16
30
10
32
10
34
10
37
10
39
10
39
13
39
5
39
11
38
6
37
11
37

output:

? 00000000000000000000000100000000000000000000000000
? 00000000000000001000000000000000000000000000000000
? 00000000000000001000000100000000000000000000000000
? 00000000000000000000000000000000001000000000000000
? 00000000000000001000000100000000001000000000000000
? 000000000000000000010000000000000...

result:

ok Correct answer with 25 queries.

Test #7:

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

input:

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

output:

? 00000000000010000000000000000000000000000000000000
? 00000000000000000000000000000001000000000000000000
? 00000000000010000000000000000001000000000000000000
? 00001000000000000000000000000000000000000000000000
? 00001000000010000000000000000000000000000000000000
? 000000000000001000000000000000000...

result:

ok Correct answer with 59 queries.

Test #8:

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

input:

50
11
8
17
10
24
9
28
8
30
6
31
8
32
7
34
4
35
9
34
5
34
10
33
8
32
7
32
5
31
5
30
8
30
7
29
8
28
10
28
9
27
7
26
4
25
8
24
5
24
9
24

output:

? 00000000000000000000000000000000000000001000000000
? 00000000000010000000000000000000000000000000000000
? 00000000000010000000000000000000000000001000000000
? 00000000000000000000000000000000000000000000001000
? 00000000000010000000000000000000000000001000001000
? 000000000000000010000000000000000...

result:

ok Correct answer with 51 queries.

Test #9:

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

input:

50
1
2
3
1
2
3
3
3
4
6
1
5
1
5
1
5
2
5
1
6
1
6
6
2
4
1
4
3
7
1
5
1
5
2
6
1
4
3
7
4
7
5
1
3
2
5
1
4
2
4
1
5
5
6
1
5
2
6
7
5
3
6
1
7
1
7
2
8
9
2
7
1
7
9
8
9
8
6
1
7
1
5
8
3
8
1
6
2
4
6
1
5
1
5
1
5
5
6
3
3
1
4
5
1
4
2
2
3
3
4
3
3
1
2
5
0

output:

? 00000000000000000000000000001000000000000000000000
? 00000000000000000000000000000000001000000000000000
? 00000000000000000000000000001000001000000000000000
? 00000000000000000000000000000000000000000000000001
? 00000000000000000000000000001000000000000000000001
? 000000000000000000000000000000000...

result:

ok Correct answer with 116 queries.

Test #10:

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

input:

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

output:

? 0000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000
? 00000000100000000000000000000000000000000000000000000000000000000000000000000000000100000000...

result:

ok Correct answer with 466 queries.

Test #11:

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

input:

100
10
10
19
11
30
8
24
6
30
14
34
11
42
16
48
11
49
9
55
13
61
9
62
5
62
5
63
12
65
9
67
7
66
12
67
11
70
7
69
11
68
10
68
8
72
12
71
5
71
5
71
13
70
13
70
11
69
7
69
9
68
12
67
10
66
9
66
9
66
10
65
8
65

output:

? 0000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000
? 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000
? 00000000000000000000000000000100000000000000000000000000000000000000000000000000000001000000...

result:

ok Correct answer with 73 queries.

Test #12:

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

input:

100
2
2
4
1
3
3
5
7
9
3
5
2
4
1
3
2
4
1
3
2
4
6
8
3
5
2
4
4
6
3
5
3
5
5
7
3
5
6
7
9
4
10
2
12
5
14
15
2
16
4
17
3
19
1
18
3
20
22
3
21
5
24
2
26
5
27
3
26
6
30
3
32
3
32
33
4
36
4
37
5
37
36
3
36
35
4
37
2
37
4
36
4
37
37
37
4
38
5
39
4
40
2
40
3
40
3
40
41
42
6
43
3
43
5
43
1
42
3
43
4
43
42
5
41
1...

output:

? 0000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000
? 0000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000001000000000000010000000000000000000000...

result:

ok Correct answer with 190 queries.

Test #13:

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

input:

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

output:

? 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
? 0000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 578 queries.

Test #14:

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

input:

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

output:

? 0000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000
? 00000000000000000000100000000000000000000000000000000000000000000000000000000010000000000000...

result:

ok Correct answer with 410 queries.

Test #15:

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

input:

150
2
6
6
3
9
3
9
3
9
4
10
3
9
4
9
2
11
3
12
1
10
4
13
3
11
1
12
4
15
2
13
2
13
4
14
2
16
1
15
3
17
1
15
3
17
2
14
4
16
3
18
3
21
6
23
1
24
2
25
2
23
3
22
2
23
25
2
25
4
26
2
28
1
27
27
4
29
3
31
2
31
3
31
5
36
3
32
1
32
34
4
37
4
37
3
38
3
41
6
42
4
45
1
45
2
46
3
47
5
47
4
48
48
49
2
48
2
50
2
48
...

output:

? 000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000
? 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 281 queries.

Test #16:

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

input:

150
4
3
7
1
5
2
6
2
6
3
7
2
6
6
10
3
7
3
6
2
7
4
10
1
11
16
12
1
11
1
11
11
3
13
6
16
1
11
2
12
3
10
3
11
3
14
2
13
1
12
2
13
2
13
2
13
14
4
15
2
13
4
15
2
13
3
13
2
15
3
16
3
16
3
13
1
14
2
15
1
14
4
17
2
14
1
15
2
16
2
16
15
2
16
3
16
2
17
20
1
18
3
20
19
23
17
3
20
2
19
2
19
1
18
3
19
3
21
24
27
...

output:

? 000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000...

result:

ok Correct answer with 355 queries.

Test #17:

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

input:

150
3
2
5
5
7
1
8
2
9
2
9
2
9
4
10
2
12
3
12
2
12
1
13
2
12
1
13
2
14
3
13
5
18
3
16
2
15
1
14
2
15
1
14
3
12
1
13
2
14
4
15
5
19
21
1
20
1
20
1
20
1
19
5
22
2
24
5
25
4
26
1
27
2
27
1
27
1
28
28
1
28
1
26
27
2
27
1
28
3
30
3
28
3
31
3
28
2
30
29
29
1
29
28
3
29
3
28
3
31
1
29
31
7
29
2
29
30
31
2
3...

output:

? 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000
? 0000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 395 queries.

Test #18:

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

input:

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

output:

? 000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000...

result:

ok Correct answer with 494 queries.

Test #19:

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

input:

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

output:

? 000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 698 queries.

Test #20:

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

input:

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

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 590 queries.

Test #21:

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

input:

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

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 1704 queries.

Test #22:

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

input:

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

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 1219 queries.

Test #23:

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

input:

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

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 936 queries.

Test #24:

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

input:

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

output:

? 00000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000...

result:

ok Correct answer with 573 queries.

Test #25:

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

input:

200
4
4
8
8
12
2
6
5
9
6
10
5
9
7
11
2
6
5
9
6
10
2
6
4
8
3
7
4
8
2
6
8
12
2
6
3
7
3
7
2
5
7
12
5
10
3
7
1
8
6
13
6
11
5
16
14
3
14
4
15
3
14
2
13
17
1
12
1
11
13
17
5
18
3
14
16
8
22
6
20
3
17
2
16
9
20
3
23
7
22
2
24
6
27
2
29
31
2
32
35
33
3
35
2
34
6
38
4
35
4
38
6
41
4
44
2
46
7
51
3
45
4
47
5
...

output:

? 00000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000...

result:

ok Correct answer with 393 queries.

Test #26:

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

input:

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

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 504 queries.

Test #27:

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

input:

200
3
4
7
2
5
1
4
4
7
1
4
5
8
4
7
2
5
3
6
4
7
1
4
4
7
5
8
6
9
4
7
7
9
4
13
8
15
3
17
21
1
18
7
24
2
19
2
19
8
25
7
23
3
26
3
26
3
26
2
24
2
25
3
28
1
26
5
28
2
30
7
31
5
34
1
35
5
38
4
42
5
40
2
42
3
42
1
43
6
45
4
48
6
52
1
53
4
54
55
6
55
3
56
4
58
4
59
4
60
3
63
61
6
64
2
65
5
67
4
71
3
67
1
66
4...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 450 queries.

Test #28:

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

input:

200
2
5
7
9
11
6
8
3
5
3
5
4
6
3
5
6
8
10
12
5
7
6
8
5
7
3
5
5
7
4
6
5
7
4
6
6
8
2
4
4
6
7
9
2
3
6
9
4
7
8
4
7
6
9
5
8
5
8
1
4
9
12
2
5
7
10
6
9
3
6
5
8
6
9
5
8
4
7
6
9
6
4
7
5
7
11
3
10
2
9
4
11
3
10
10
15
6
18
22
22
21
26
3
24
2
22
5
27
7
27
5
31
6
36
4
40
8
44
40
43
5
47
5
48
3
51
3
51
4
51
4
54
...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 466 queries.

Test #29:

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

input:

200
6
2
8
8
14
2
8
4
10
4
10
4
10
8
14
4
8
4
12
6
13
10
19
4
23
5
24
5
24
5
24
5
24
21
27
5
24
7
26
3
21
3
24
3
24
1
22
2
21
3
24
4
24
3
27
4
24
6
28
3
31
2
30
3
31
31
4
32
3
28
8
34
8
40
42
5
45
2
47
3
48
4
47
5
50
53
4
57
3
56
5
55
5
57
6
59
2
59
2
60
4
64
4
62
5
66
2
68
3
69
7
72
3
72
2
73
2
73
6...

output:

? 00100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 348 queries.

Test #30:

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

input:

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

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 1160 queries.

Test #31:

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

input:

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

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000
? 00000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 1234 queries.

Test #32:

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

input:

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

output:

? 00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 1333 queries.

Test #33:

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

input:

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

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 1146 queries.

Test #34:

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

input:

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

output:

? 00000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 1243 queries.

Test #35:

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

input:

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

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 989 queries.

Test #36:

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

input:

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

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 866 queries.

Test #37:

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

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
1
3
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:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000...

result:

ok Correct answer with 3500 queries.

Test #38:

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

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
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
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
5
2
5
2
5
2
4
2
6
2
6
2
6
2
6
2
6
2
6
2
5
2
7
7
2
7
2
7
2
4
6
6
2
6
2
6
6
2
3
2
5
2
5
2
5
2
5
5
...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 2603 queries.

Test #39:

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

input:

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

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000...

result:

ok Correct answer with 1111 queries.

Test #40:

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

input:

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

output:

? 00000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000...

result:

ok Correct answer with 1094 queries.

Test #41:

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

input:

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

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000...

result:

ok Correct answer with 1369 queries.

Test #42:

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

input:

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

output:

? 00000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000...

result:

ok Correct answer with 1041 queries.

Test #43:

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

input:

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

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000...

result:

ok Correct answer with 1189 queries.

Test #44:

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

input:

200
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
199
191

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 17 queries.

Test #45:

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

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:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 401 queries.

Test #46:

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

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
11
12
1
2
1
2
1
1
2
1
2
2
1
2
1
2
1
2
1
2
1
2
1
1
1
2
1
2
1
2
1
2
1
2
1
2
1
2
14
14
1
15
15
1
15
1
15
15
1
15
15
14
1
15
1
13
1
14
1
14
8
21
1
13
1
14
1
14
1
14
1
14
1
13
1
14
1
12
1
13
1
12
1
12
13
1
11
1
12
22
33
1
12
1
12
1
11
1
12
18
21
1
21
1
22...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 838 queries.

Test #47:

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

input:

200
1
1
2
1
2
1
2
1
2
1
2
1
2
20
21
1
2
1
2
1
2
16
17
1
2
1
2
1
2
1
2
1
1
1
1
1
2
1
2
1
2
1
2
1
2
1
2
1
2
13
14
1
2
1
2
1
2
1
2
1
2
1
2
1
2
2
1
2
16
17
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
13
14
1
2
1
2
1
2
1
2
1
2
1
2
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
...

output:

? 00000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 582 queries.

Test #48:

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

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
3
5
2
5
5
2
5
5
2
5
5
2
5
2
5
2
5
5
2
5
5
5
2
5
5
5
5
2
5
2
5
2
5
5
2
5
2
5
2
5
5
2
5
2
...

output:

? 00000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000...

result:

ok Correct answer with 3500 queries.

Test #49:

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

input:

200
2
2
4
2
4
1
3
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
3
2
5
2
5
2
5
2
5
2
5
2
5
2
4
2
6
2
6
2
6
2
6
2
6
6
2
6
6
6
2
6
2
6
2
6
2
6
2
6
2
6
6
2
...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000
? 00000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 3500 queries.

Test #50:

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

input:

200
2
2
4
2
4
2
2
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
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
1
3
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
4
2
4
2
4
2
4
2
4
4
2
4
2
4
4
2
4
4
4
2
4
2
4
2
4
2
4
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 3500 queries.

Test #51:

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

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
1
3
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
2
5
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
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
5
2
...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

wrong answer Wrong answer.