QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#807480#9188. Light Bulbsucup-team00487.826087 1227ms4028kbC++237.7kb2024-12-10 01:05:052024-12-10 01:05:06

Judging History

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

  • [2024-12-10 01:05:06]
  • 评测
  • 测评结果:87.826087
  • 用时:1227ms
  • 内存:4028kb
  • [2024-12-10 01:05:05]
  • 提交

answer

#include <bits/stdc++.h>

using i64 = long long;
using u64 = unsigned long long;
using u32 = unsigned;

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

constexpr bool debug = false;

int main() {
    std::ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    
    // std::fclose(stderr);
    
    int N;
    std::cin >> N;
    
    std::vector<std::string> lights(N);
    if (debug) {
        // for (int i = 0; i < N; i++) {
        //     std::cin >> lights[i];
        // }
        for (int i = 0; i < N; i++) {
            for (int j = 0; j < N; j++) {
                lights[i] += "HV"[rng() % 2];
            }
        }
    }
    
    std::vector<std::array<int, 3>> determined;
    std::vector<std::array<int, 2>> candidates;
    std::vector<int> possible {0};
    
    int cnt[2] {};
    
    std::vector lit(N, std::vector<bool>(N));
    
    std::vector type(N, std::vector<int>(N, -1));
    std::vector candId(N, std::vector<int>(N, -1));
    
    int calls = 0;
    auto calc = [&](const std::vector<std::array<int, 2>> &q, int s) -> int {
        calls++;
        std::vector<bool> row(N), col(N);
        for (auto [x, y] : q) {
            if (type[x][y] != -1) {
                if (type[x][y] == 0) {
                    row[x] = true;
                } else {
                    col[y] = true;
                }
            } else {
                assert(candId[x][y] != -1);
                if (s >> candId[x][y] & 1) {
                    col[y] = true;
                } else {
                    row[x] = true;
                }
            }
        }
        return N * N - std::count(row.begin(), row.end(), false) * std::count(col.begin(), col.end(), false);
    };
    
    int rounds = 0;
    
    while (cnt[0] < N && cnt[1] < N) {
        if (debug) {
            rounds++;
            std::cerr << "candidates : " << candidates.size() << ", possibilities : " << possible.size() << "\n";
            for (auto [x, y] : candidates) {
                std::cerr << "(" << x << ", " << y << ") ";
            }
            std::cerr << "\n";
            for (auto s : possible) {
                for (int i = 0; i < candidates.size(); i++) {
                    std::cerr << (s >> i & 1);
                }
                std::cerr << " ";
            }
            std::cerr << "\n";
            
            int fact = 0;
            for (auto [x, y] : candidates) {
                if (lights[x][y] == 'V') {
                    fact |= 1 << candId[x][y];
                }
            }
            
            assert(std::find(possible.begin(), possible.end(), fact) != possible.end());
        }
        for (int t = 0; t < 512 && possible.size() <= 512 && candidates.size() < 31; t++) {
            int x = rng() % N;
            int y = rng() % N;
            if (lit[x][y] || candId[x][y] != -1) {
                continue;
            }
            for (int i = possible.size() - 1; i >= 0; i--) {
                possible.push_back(possible[i] | 1 << candidates.size());
            }
            candId[x][y] = candidates.size();
            candidates.push_back({x, y});
        }
        
        std::vector<std::array<int, 2>> query;
        int E = 1E9;
        for (int t = 0; t < 64; t++) {
            int p = rng() % 100 + 1;
            std::vector<std::array<int, 2>> q;
            for (auto [a, b, c] : determined) {
                if (rng() % 100 < p) {
                    q.push_back({a, b});
                }
            }
            for (auto [a, b] : candidates) {
                if (rng() % 100 < p) {
                    q.push_back({a, b});
                }
            }
            std::map<int, int> freq;
            for (auto s : possible) {
                freq[calc(q, s)]++;
            }
            int ent = 0;
            for (auto [_, c] : freq) {
                ent += c * c;
            }
            if (ent < E) {
                E = ent;
                query = q;
            }
        }
        
        int result;
        if (debug) {
            std::vector<bool> row(N), col(N);
            for (auto [x, y] : query) {
                if (lights[x][y] == 'H') {
                    row[x] = true;
                } else {
                    col[y] = true;
                }
            }
            result = N * N - std::count(row.begin(), row.end(), false) * std::count(col.begin(), col.end(), false);
            std::cerr << result << "\n";
        } else {
            std::cout << "?\n";
            
            std::vector choose(N, std::vector<bool>(N));
            for (auto [a, b] : query) {
                choose[a][b] = true;
            }
            
            for (int i = 0; i < N; i++) {
                for (int j = 0; j < N; j++) {
                    std::cout << choose[i][j];
                }
                std::cout << "\n";
            }
            std::cout.flush();
            
            std::cin >> result;
        }
        
        {
            std::vector<int> newPossible;
            for (auto s : possible) {
                if (debug) {
                    std::cerr << s << " expected : " << calc(query, s) << "\n";
                }
                if (calc(query, s) == result) {
                    newPossible.push_back(s);
                }
            }
            possible = std::move(newPossible);
        }
        
        int maybe[2] {};
        for (auto s : possible) {
            maybe[0] |= ((1 << candidates.size()) - 1) ^ s;
            maybe[1] |= s;
        }
        
        std::vector<std::array<int, 2>> newCand;
        for (int i = 0; i < candidates.size(); i++) {
            auto [x, y] = candidates[i];
            if ((maybe[0] ^ maybe[1]) >> i & 1) {
                if (!lit[x][y]) {
                    int t = maybe[0] >> i & 1 ? 0 : 1;
                    cnt[t]++;
                    type[x][y] = t;
                    if (t == 0) {
                        for (int j = 0; j < N; j++) {
                            lit[x][j] = true;
                        }
                    } else {
                        for (int j = 0; j < N; j++) {
                            lit[j][y] = true;
                        }
                    }
                    determined.push_back({x, y, t});
                }
                candId[x][y] = -1;
            } else {
                candId[x][y] = newCand.size();
                newCand.push_back({x, y});
            }
        }
        
        for (auto &s : possible) {
            int ns = 0;
            for (int i = 0; i < candidates.size(); i++) {
                if (s >> i & 1) {
                    auto [x, y] = candidates[i];
                    if (candId[x][y] != -1) {
                        ns |= 1 << candId[x][y];
                    }
                }
            }
            s = ns;
        }
        
        std::sort(possible.begin(), possible.end());
        possible.erase(std::unique(possible.begin(), possible.end()), possible.end());
        candidates = std::move(newCand);
    }
    
    int t = cnt[0] == N ? 0 : 1;
    std::cout << "!\n";
    
    std::vector choose(N, std::vector<bool>(N));
    for (auto [a, b, c] : determined) {
        if (c == t) {
            choose[a][b] = true;
        }
    }
    
    if (debug) {
        std::cout << "calls : " << calls << "\n";
        std::cout << "rounds : " << rounds << "\n";
    }
    for (int i = 0; i < N; i++) {
        for (int j = 0; j < N; j++) {
            std::cout << choose[i][j];
        }
        std::cout << "\n";
    }
    std::cout.flush();
    
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 11
Accepted

Test #1:

score: 11
Accepted
time: 3ms
memory: 3604kb

input:

3
9
9

output:

?
101
100
100
?
010
111
011
!
010
100
100

result:

points 1.0 points  1.0 correct, 2 queries

Test #2:

score: 11
Accepted
time: 1ms
memory: 3604kb

input:

3
9
9

output:

?
111
000
001
?
010
010
101
!
110
000
001

result:

points 1.0 points  1.0 correct, 2 queries

Test #3:

score: 11
Accepted
time: 4ms
memory: 3656kb

input:

3
9
5

output:

?
001
110
001
?
000
111
010
!
001
100
001

result:

points 1.0 points  1.0 correct, 2 queries

Test #4:

score: 11
Accepted
time: 4ms
memory: 3760kb

input:

3
9
7
7
7
8
5

output:

?
111
000
100
?
000
110
111
?
000
111
010
?
010
110
010
?
101
011
100
?
010
000
001
!
011
000
100

result:

points 1.0 points  1.0 correct, 6 queries

Test #5:

score: 11
Accepted
time: 4ms
memory: 3628kb

input:

3
7
5
7
7
8
9

output:

?
110
100
100
?
000
100
111
?
111
100
100
?
001
110
100
?
001
111
000
?
001
101
001
!
001
001
001

result:

points 1.0 points  1.0 correct, 6 queries

Test #6:

score: 11
Accepted
time: 4ms
memory: 3812kb

input:

3
7
9
9
9
7
9

output:

?
100
110
100
?
111
000
100
?
001
111
101
?
110
001
010
?
100
100
111
?
100
101
011
!
011
100
000

result:

points 1.0 points  1.0 correct, 6 queries

Test #7:

score: 11
Accepted
time: 4ms
memory: 3852kb

input:

3
7
7
8
8
5
5

output:

?
010
010
010
?
000
101
111
?
001
001
110
?
011
001
001
?
000
101
000
?
100
000
001
!
111
000
000

result:

points 1.0 points  1.0 correct, 6 queries

Test #8:

score: 11
Accepted
time: 2ms
memory: 3884kb

input:

3
8
7
8
6

output:

?
110
010
010
?
001
110
001
?
101
011
100
?
000
110
011
!
111
000
000

result:

points 1.0 points  1.0 correct, 4 queries

Test #9:

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

input:

3
5
7
7
7
9

output:

?
101
001
001
?
101
010
010
?
011
110
010
?
101
000
100
?
100
101
100
!
100
100
100

result:

points 1.0 points  1.0 correct, 5 queries

Test #10:

score: 11
Accepted
time: 4ms
memory: 3628kb

input:

3
5
5
8
5
9

output:

?
100
100
100
?
001
101
001
?
010
011
100
?
000
010
010
?
010
011
011
!
000
010
101

result:

points 1.0 points  1.0 correct, 5 queries

Test #11:

score: 11
Accepted
time: 4ms
memory: 3608kb

input:

3
7
7
7
7
9

output:

?
011
010
010
?
010
010
101
?
101
100
100
?
111
000
100
?
110
010
100
!
001
010
100

result:

points 1.0 points  1.0 correct, 5 queries

Test #12:

score: 11
Accepted
time: 2ms
memory: 3576kb

input:

3
7
9
8
7

output:

?
010
011
010
?
001
001
101
?
111
010
010
?
000
101
100
!
001
001
100

result:

points 1.0 points  1.0 correct, 4 queries

Test #13:

score: 11
Accepted
time: 5ms
memory: 3880kb

input:

3
7
7
7
8
8

output:

?
111
010
000
?
010
010
110
?
000
100
111
?
010
110
100
?
101
011
000
!
010
001
100

result:

points 1.0 points  1.0 correct, 5 queries

Test #14:

score: 11
Accepted
time: 3ms
memory: 3884kb

input:

3
9
8
9
8
7

output:

?
101
100
100
?
010
010
111
?
111
001
010
?
101
111
000
?
100
101
110
!
010
100
100

result:

points 1.0 points  1.0 correct, 5 queries

Test #15:

score: 11
Accepted
time: 5ms
memory: 3656kb

input:

3
7
7
9
8
8

output:

?
110
100
100
?
001
011
001
?
001
001
111
?
110
001
001
?
100
111
100
!
011
100
000

result:

points 1.0 points  1.0 correct, 5 queries

Test #16:

score: 11
Accepted
time: 5ms
memory: 3732kb

input:

3
7
7
7
7
8
7

output:

?
010
111
000
?
100
000
111
?
111
000
100
?
010
010
011
?
000
011
101
?
111
010
000
!
100
100
010

result:

points 1.0 points  1.0 correct, 6 queries

Test #17:

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

input:

3
7
8
8
9

output:

?
111
000
000
?
000
111
101
?
010
010
101
?
000
100
111
!
000
100
011

result:

points 1.0 points  1.0 correct, 4 queries

Subtask #2:

score: 11
Accepted

Dependency #1:

100%
Accepted

Test #18:

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

input:

3
9
9
9

output:

?
100
100
101
?
010
010
111
?
001
001
001
!
100
100
001

result:

points 1.0 points  1.0 correct, 3 queries

Test #19:

score: 11
Accepted
time: 4ms
memory: 3860kb

input:

3
9
9
9
6

output:

?
000
111
101
?
111
100
100
?
000
100
111
?
101
101
100
!
001
010
100

result:

points 1.0 points  1.0 correct, 4 queries

Test #20:

score: 11
Accepted
time: 5ms
memory: 3812kb

input:

3
7
7
9
7
9

output:

?
010
111
000
?
110
010
010
?
110
110
100
?
000
100
111
?
001
001
011
!
001
001
100

result:

points 1.0 points  1.0 correct, 5 queries

Test #21:

score: 11
Accepted
time: 3ms
memory: 3660kb

input:

3
8
9
5

output:

?
111
010
000
?
100
100
110
?
000
001
011
!
100
010
010

result:

points 1.0 points  1.0 correct, 3 queries

Test #22:

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

input:

3
9
7
8
8
8
6

output:

?
001
101
001
?
100
100
111
?
110
100
110
?
100
011
100
?
010
101
011
?
101
001
000
!
001
001
001

result:

points 1.0 points  1.0 correct, 6 queries

Test #23:

score: 11
Accepted
time: 3ms
memory: 3656kb

input:

3
9
9
5
7

output:

?
111
010
000
?
000
111
110
?
001
000
101
?
001
000
011
!
101
000
010

result:

points 1.0 points  1.0 correct, 4 queries

Test #24:

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

input:

3
6
7
8
8

output:

?
110
100
100
?
001
001
001
?
010
001
110
?
010
010
101
!
011
000
100

result:

points 1.0 points  1.0 correct, 4 queries

Test #25:

score: 11
Accepted
time: 4ms
memory: 3728kb

input:

3
7
7
5
5

output:

?
010
011
010
?
011
111
000
?
001
000
111
?
100
011
000
!
111
000
000

result:

points 1.0 points  1.0 correct, 4 queries

Test #26:

score: 11
Accepted
time: 3ms
memory: 3736kb

input:

3
5
7
7
7
8

output:

?
110
010
010
?
010
101
010
?
011
101
000
?
100
001
101
?
000
100
111
!
100
100
100

result:

points 1.0 points  1.0 correct, 5 queries

Test #27:

score: 11
Accepted
time: 3ms
memory: 3604kb

input:

3
5
8
9

output:

?
100
101
100
?
011
010
011
?
010
111
010
!
010
001
010

result:

points 1.0 points  1.0 correct, 3 queries

Test #28:

score: 11
Accepted
time: 4ms
memory: 3608kb

input:

3
7
7
7
7
9

output:

?
000
001
111
?
101
001
001
?
111
000
100
?
010
001
101
?
011
011
001
!
100
010
100

result:

points 1.0 points  1.0 correct, 5 queries

Test #29:

score: 11
Accepted
time: 3ms
memory: 3656kb

input:

3
5
7
7
7
7

output:

?
100
100
110
?
010
010
011
?
000
010
101
?
001
001
001
?
010
000
011
!
001
001
010

result:

points 1.0 points  1.0 correct, 5 queries

Test #30:

score: 11
Accepted
time: 2ms
memory: 3608kb

input:

3
7
7
8
9
8

output:

?
101
001
001
?
111
100
000
?
100
100
101
?
010
110
001
?
101
010
010
!
000
110
001

result:

points 1.0 points  1.0 correct, 5 queries

Test #31:

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

input:

3
7
7
8
7
8
9

output:

?
111
100
000
?
011
010
010
?
100
101
101
?
000
001
111
?
000
110
101
?
111
001
010
!
001
100
010

result:

points 1.0 points  1.0 correct, 6 queries

Test #32:

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

input:

3
8
9
8
8
7
9

output:

?
011
010
011
?
001
001
110
?
111
010
000
?
100
001
101
?
100
100
001
?
101
100
010
!
001
100
010

result:

points 1.0 points  1.0 correct, 6 queries

Test #33:

score: 11
Accepted
time: 5ms
memory: 3628kb

input:

3
7
8
9
9
8
8

output:

?
110
010
010
?
101
111
000
?
100
100
110
?
111
010
100
?
010
111
100
?
100
010
101
!
100
100
001

result:

points 1.0 points  1.0 correct, 6 queries

Test #34:

score: 11
Accepted
time: 4ms
memory: 3660kb

input:

3
8
9
9
7
7

output:

?
000
010
111
?
010
111
000
?
101
010
100
?
111
000
000
?
101
000
001
!
110
000
001

result:

points 1.0 points  1.0 correct, 5 queries

Test #35:

score: 11
Accepted
time: 26ms
memory: 3668kb

input:

10
70
70
80
90
50
90

output:

?
0000000010
0000000010
0000000000
0010100000
0001000000
0000000011
0000000000
0000000000
0000000010
1000000000
?
0000000010
0000000001
0011000000
0010000000
0000000000
0000000011
0000000000
0000000000
0000000011
1000000000
?
0000000010
0000000011
0011000000
0010000000
0001000000
0000000010
00000000...

result:

points 1.0 points  1.0 correct, 6 queries

Test #36:

score: 11
Accepted
time: 31ms
memory: 3704kb

input:

10
70
70
80
70
80
90
70

output:

?
0000000000
0000000000
0000010100
1000000000
0000000000
0000100010
0100000000
0000000001
1100010000
0000000000
?
0000000000
0000000000
0000000100
0000000000
0000000000
1000000010
0100000000
0001000001
1100010000
0000000000
?
0000000000
0000100000
0000010100
1100000000
0000000000
1000100000
01000000...

result:

points 1.0 points  1.0 correct, 7 queries

Test #37:

score: 11
Accepted
time: 37ms
memory: 3704kb

input:

10
76
68
64
84
82
84
91

output:

?
0000000000
0000000000
0000001000
0000100000
0010000000
1000000000
0010000000
0000010001
1001000000
1000000000
?
0000000000
0000000000
0000001000
0000100000
0010000000
1000000000
1010000000
0000110101
1001000000
0000000000
?
0000000000
0010000000
0000100000
0000100000
0010000000
0000000000
10100001...

result:

points 1.0 points  1.0 correct, 7 queries

Test #38:

score: 11
Accepted
time: 27ms
memory: 3864kb

input:

10
65
65
84
92
91
88

output:

?
0000000000
1000001000
0000001000
0001010000
1000000000
0000000010
0000000000
0000001100
0000000000
0000100000
?
0000000000
1000001000
0000001000
0001000000
0000000000
0000000010
0010000000
0000001101
0000000000
0000100000
?
0000000000
1000001000
0000000000
0001000000
1000000000
0000000010
00100000...

result:

points 1.0 points  1.0 correct, 6 queries

Test #39:

score: 11
Accepted
time: 36ms
memory: 3684kb

input:

10
68
82
79
84
72
76
86
68
68

output:

?
0100000011
0000000001
0000000000
0100000000
0000000001
0000000000
0000001001
0000000000
0000000000
0000000100
?
0000001011
0000000001
0000100000
0100000000
0000000001
0000000000
0000001101
0000001000
0000000100
0000000100
?
0100000011
0000000001
1000100010
0100000000
0000000000
0000000000
00000011...

result:

points 1.0 points  1.0 correct, 9 queries

Test #40:

score: 11
Accepted
time: 50ms
memory: 3604kb

input:

10
75
84
84
85
90
94
80
92
70
82

output:

?
0010000000
0101000000
0000000000
0000100000
0000000110
0000000000
0010000100
0000101000
0000000000
0000000000
?
0010000000
1101000000
0000000100
0000000000
0010000110
0000000000
0000000100
0000101000
0000000000
0001000000
?
0000000000
1100100000
0000001101
0000000000
0000000110
0000000000
00100000...

result:

points 1.0 points  1.0 correct, 10 queries

Test #41:

score: 11
Accepted
time: 36ms
memory: 3724kb

input:

8
48
49
52
54
59
56
50
55
59
46

output:

?
01000001
00001000
10000000
00000000
00000100
00000000
00000000
10100011
?
00000001
00001001
00000001
01000000
00000010
00000000
00000000
10000011
?
00000001
00001001
10000001
01000000
00000010
01000000
00000000
10110010
?
01000001
00001000
10000001
01000000
00100010
01000000
00100000
00100000
?
00...

result:

points 1.0 points  1.0 correct, 10 queries

Test #42:

score: 11
Accepted
time: 57ms
memory: 3612kb

input:

10
64
75
52
80
80
76
82
90
92
82
80
64
79
79

output:

?
1000000000
0010000000
0000000000
0000000010
0000000000
0000010100
0010000000
0000001000
0000000000
0010100000
?
1000000000
0001000000
0000000000
0000001000
0000000000
0000010100
0010000000
0000001000
0001000000
0010100000
?
0000000000
0010000000
0000000000
0000101010
0000000000
0000000100
00100000...

result:

points 1.0 points  1.0 correct, 14 queries

Test #43:

score: 11
Accepted
time: 57ms
memory: 3668kb

input:

9
51
33
63
66
66
61
53
75
66
66
51
71

output:

?
001000000
000100000
100010000
001000000
000000000
000000000
000101000
001000001
000001000
?
000000000
000000000
000000000
000000000
000010000
000000000
000101000
001000101
000001000
?
001000000
000100000
101000000
001000000
000010000
000000100
001101000
001000000
010000000
?
001100000
000100100
10...

result:

points 1.0 points  1.0 correct, 12 queries

Test #44:

score: 11
Accepted
time: 37ms
memory: 3868kb

input:

10
64
68
76
93
79
68
80

output:

?
0100000000
0000000000
0000000000
0010000000
0001101000
0000000000
0010000000
0000000011
0000000000
0000001000
?
0000000000
0000000000
0000100000
0000000000
0001101000
0000000100
0011000000
0000000011
0000000000
0000000000
?
0100010000
1000000000
0101100000
0010000000
0000001000
0000000100
00100000...

result:

points 1.0 points  1.0 correct, 7 queries

Test #45:

score: 11
Accepted
time: 32ms
memory: 3616kb

input:

10
80
88
55
36
72
50

output:

?
0000100100
0000001000
0000010000
0000000000
0000000000
0001000000
0010000010
0000001001
0000000000
0000000000
?
1000100100
1100000001
0000010000
0000000000
0000000000
1101000000
0000000010
1000001000
0100000000
1100000000
?
1000000100
0100000000
0000000000
0000000000
0000000000
0101000000
10100000...

result:

points 1.0 points  1.0 correct, 6 queries

Test #46:

score: 11
Accepted
time: 30ms
memory: 3700kb

input:

10
73
90
82
91
91
55

output:

?
0000000000
0000000001
1100000000
0000000000
0011100000
0100010000
1000000000
0000000000
0000000000
0000000000
?
0000001000
0000001001
1100000000
0000001000
0011100000
0100010000
0000000000
0100001000
0000000010
0000000000
?
0000000000
0000001001
1100000000
0000001100
0011000000
0100000000
10010000...

result:

points 1.0 points  1.0 correct, 6 queries

Test #47:

score: 11
Accepted
time: 28ms
memory: 3604kb

input:

10
73
64
91
91
73

output:

?
0000000000
0000001000
0000000000
0000010000
0100010000
0000100000
0000000100
0000000000
1000010001
0001000000
?
0000000100
0000001000
0000001000
0000010000
0100010000
0010000000
0000000100
0000000000
0000000101
0000000000
?
0000000100
0000001000
0010100000
0000010000
0100001000
0010100000
00000001...

result:

points 1.0 points  1.0 correct, 5 queries

Test #48:

score: 11
Accepted
time: 33ms
memory: 3896kb

input:

10
64
50
82
86
82
55
97

output:

?
0100000000
0100010101
0100000000
1000000000
0000001000
0010000000
1000000000
0000000000
0000000000
0000000000
?
0000000000
0100010101
0000000000
0000000000
0000000000
0010000000
1000000000
0000001000
0000100000
0000000000
?
1000000000
0000000001
0100000010
1001001000
1010001000
0010000000
10000000...

result:

points 1.0 points  1.0 correct, 7 queries

Test #49:

score: 11
Accepted
time: 31ms
memory: 3724kb

input:

10
68
73
93
91
72
94
93

output:

?
0000010000
0000100000
0000000000
0000101000
0000100000
1010000000
0000000000
0000000000
0010000000
0010000000
?
0000010100
0000101010
0000000000
0000001000
0000100000
1010000000
0000010000
0000000000
0010000000
0000001000
?
0000010100
0000100000
0000000001
0000011001
0000100000
1010000000
00000010...

result:

points 1.0 points  1.0 correct, 7 queries

Test #50:

score: 11
Accepted
time: 46ms
memory: 3720kb

input:

10
60
64
76
73
90
90
82
80
82
76
65

output:

?
0000001000
0000000000
0100100000
0001001000
0000001000
0000000000
0000000000
0000000000
0000110000
0010100000
?
0000001000
0000000000
0100000000
0000001000
0100001000
0000001000
0000000000
0000000000
0000110000
0000100000
?
0000001100
0000000010
0000100000
0001000000
0100100000
0001001000
00000000...

result:

points 1.0 points  1.0 correct, 11 queries

Test #51:

score: 11
Accepted
time: 30ms
memory: 3892kb

input:

10
64
55
84
76
86
84
75
95
82
92

output:

?
0000001100
0000000010
0000000000
0000000000
0000000000
0000101000
0100000010
0000010000
0000001000
1000000000
?
0000001100
0100000010
0000000000
0000000000
0000000010
0000001000
0000000010
0000010000
0000001000
1000000000
?
0000001100
0101000000
0000000000
0010000000
0000000000
0000100000
10000000...

result:

points 1.0 points  1.0 correct, 10 queries

Test #52:

score: 11
Accepted
time: 27ms
memory: 3596kb

input:

10
55
72
92
86
86
84
88
94
90
100

output:

?
0000001010
0000000010
0000000100
0000000100
0100000000
0010000000
0000000010
0000000000
0000000000
0000100100
?
1000011000
0000000000
0000000000
1000000000
0110000000
0000000000
0000000000
0100000000
0000000000
0100100100
?
1000011000
0001000001
0000000100
0000000000
0110000000
0010000000
00000000...

result:

points 1.0 points  1.0 correct, 10 queries

Test #53:

score: 11
Accepted
time: 29ms
memory: 3660kb

input:

10
60
64
73
91
88
96
85

output:

?
0000000000
0111000000
0000000000
1000000010
0000000010
0000000010
0010000000
0000010000
0100000000
0000000000
?
0100000000
0110000000
0000000000
1000000011
0000000000
0000000000
0000000000
0000010100
0100000000
0000000000
?
0000000000
0010000000
0000000000
1000000111
0000000010
0000000110
00100000...

result:

points 1.0 points  1.0 correct, 7 queries

Test #54:

score: 11
Accepted
time: 56ms
memory: 3816kb

input:

10
55
60
79
76
85
86
82
84
60
84
96
85
85
100

output:

?
0011110000
1000010000
0000001000
0000000000
0000000001
0000000000
0000000000
0000000101
0000000000
0000000000
?
0010000000
1000010000
0011001000
0010000000
0100000000
0000000000
0000000000
0000000101
0000000000
0000000000
?
0011110100
1000000000
1001001000
0010000000
0100000001
0010000000
00000000...

result:

points 1.0 points  1.0 correct, 14 queries

Test #55:

score: 11
Accepted
time: 47ms
memory: 3616kb

input:

10
65
72
60
72
64
79
94
90
88
100
70
60
94

output:

?
0010000000
0011000100
0000000000
0000000000
0000001000
0000000000
0000010000
0010000000
0100000001
0000100000
?
0000000000
0000000100
0000000000
0000000000
0000101000
0000000000
0001010000
0010000000
0100000001
0000100000
?
0000000000
0011010100
0000000000
0000010000
0000011000
0000000000
10010100...

result:

points 1.0 points  1.0 correct, 13 queries

Test #56:

score: 11
Accepted
time: 23ms
memory: 3664kb

input:

10
70
50
55
97
92
82

output:

?
0000000000
0000000001
0010000000
0110000000
0000000000
0000000000
0000100101
0001000000
0000001000
0000000001
?
0000000000
0000000000
0000000000
0110000010
0000000000
0000000000
0000100101
0001000000
0001001000
0000000001
?
0001011100
0000000000
0010000000
0000000000
0000010000
0010000001
00000000...

result:

points 1.0 points  1.0 correct, 6 queries

Test #57:

score: 11
Accepted
time: 67ms
memory: 3668kb

input:

10
58
44
75
65
64
80
88
72
82
94
80
76
90
92
85

output:

?
1000000000
0000000001
0100000000
0100000000
0000000010
0000000000
0000000100
0000000000
0000000000
1010001000
?
0000000000
0000000000
0000001000
0100000000
0000000010
0000000000
0000000100
0000000000
0000001000
1010100000
?
1000000000
0000000001
0101001000
0000000001
0100100010
0000000000
00000001...

result:

points 1.0 points  1.0 correct, 15 queries

Test #58:

score: 11
Accepted
time: 59ms
memory: 3660kb

input:

10
52
64
70
70
65
70
85
88
75
79
100
91
94
88

output:

?
0000000000
0000100000
0000101001
0011000100
0000000000
1000000000
0000000000
0000000000
0000000000
0000100000
?
0000000000
0001100000
0000101101
0000000100
0000000000
1000000000
1000000000
0000000000
0000000000
0000000000
?
0000000000
0001000000
0000101101
0011010000
0000000000
1000000100
00000010...

result:

points 1.0 points  1.0 correct, 14 queries

Test #59:

score: 11
Accepted
time: 55ms
memory: 3896kb

input:

10
60
58
80
64
76
95
72
79
92
88
92

output:

?
0000000000
0000001100
1010000000
0000000000
0000000000
0010000000
0000100000
0000001000
0000000000
0011001000
?
0000000000
0001000000
0010000000
0000000000
0000000000
0010000000
0000100000
0001001000
0000000000
0010000000
?
0000000000
0001001100
1011000000
1000000000
0000000010
0010000001
00001000...

result:

points 1.0 points  1.0 correct, 11 queries

Test #60:

score: 11
Accepted
time: 67ms
memory: 3640kb

input:

10
70
80
58
70
75
65
76
85
64
75
91
84

output:

?
0000000000
0010000000
0000010000
0100000000
0000000000
1000000000
0000000000
0001000001
1000000100
0000001000
?
0000100000
0010000000
0000011000
0100000000
0000000000
1000000000
0001000000
0001000001
1000000000
0000001000
?
0000100000
0010000000
0000001000
0000000000
0000000000
1000000000
00010001...

result:

points 1.0 points  1.0 correct, 12 queries

Test #61:

score: 11
Accepted
time: 34ms
memory: 3816kb

input:

10
70
70
82
73
84
90
86

output:

?
0000000000
0000010000
0100000001
0000000000
0000000000
0001000100
0100000000
0000011000
0100000000
0000000100
?
0000010000
0000010000
0100000001
0000000000
0000000000
0001000000
0000000000
0000010000
0100000000
0000001100
?
1000010000
0000010000
0000000001
0000000000
0000000000
0001001100
01000000...

result:

points 1.0 points  1.0 correct, 7 queries

Test #62:

score: 11
Accepted
time: 26ms
memory: 3668kb

input:

10
64
50
80
82
91
79

output:

?
0000000000
0000000000
0000000000
0010000001
1000000000
1000000000
0000000000
0101000100
1000010000
0000010000
?
0000000000
0000000000
0000000000
0010000001
1000000000
0000000000
1000000000
0001000000
1000000000
0000000010
?
0100000000
0000000000
0000000000
0010010100
0100010000
1000000000
00000000...

result:

points 1.0 points  1.0 correct, 6 queries

Test #63:

score: 11
Accepted
time: 14ms
memory: 3892kb

input:

9
67
73
72

output:

?
000000000
000000100
000000001
000000000
010001000
000011000
000100001
001000010
000000000
?
000000000
000000110
000000000
000000000
010001000
000111000
100100001
000000000
000010000
?
000100000
000000110
000000001
000000000
010001000
000110000
000100010
000000000
001100000
!
000000000
000000110
00...

result:

points 1.0 points  1.0 correct, 3 queries

Test #64:

score: 11
Accepted
time: 22ms
memory: 3664kb

input:

9
60
49
60
81
63
72

output:

?
000000000
100000000
000001010
000000000
000000001
001001000
000000000
000000100
010000101
?
000000000
000100000
000001000
000000000
000000000
001000000
000100000
000000000
010001101
?
000000000
100100000
000001110
000000100
000000000
011001000
000101010
000000000
010001101
?
000000100
100100000
00...

result:

points 1.0 points  1.0 correct, 6 queries

Test #65:

score: 11
Accepted
time: 27ms
memory: 3704kb

input:

8
48
57
40
52
48

output:

?
00000001
00000000
00000001
00000001
00000000
01010000
00001000
00100010
?
00000001
10000000
00000001
00010001
00100000
01011010
00001000
00100000
?
00000001
10000000
00000001
00000101
00000101
00101000
00000000
10100000
?
00000100
00000100
00000100
00010001
00000100
00011100
00000000
10000010
?
00...

result:

points 1.0 points  1.0 correct, 5 queries

Test #66:

score: 11
Accepted
time: 26ms
memory: 3596kb

input:

8
46
64
57
40
58
50
48

output:

?
01000000
00000000
00100100
00010010
00000001
00000000
11000001
00000000
?
01000010
00100000
00100100
00010010
00000001
10000000
11000001
00010000
?
01000010
00100000
01100100
00000001
00000001
00000000
01100000
00010000
?
00000000
00000000
01100010
10000000
00000001
00000000
00000010
00010000
?
00...

result:

points 1.0 points  1.0 correct, 7 queries

Test #67:

score: 11
Accepted
time: 14ms
memory: 3896kb

input:

7
37
37
42
37
14

output:

?
0010000
0000100
0000000
0000010
1010000
0000100
0001111
?
0000000
0000100
0000001
0000000
1010000
0000100
0000011
?
0010110
0000100
0000001
0000010
1000000
0100100
0000110
?
0001000
0001000
0001000
0001000
1011000
0001100
0000010
?
0001000
0001000
0000000
0000000
1000000
0001000
0000000
!
0001000
...

result:

points 1.0 points  1.0 correct, 5 queries

Test #68:

score: 11
Accepted
time: 22ms
memory: 3636kb

input:

7
37
37
37
44
49
37
28

output:

?
0100001
0001100
0000000
0000100
0000100
0000001
0000100
?
0100001
0001100
0000000
1010100
0000110
0000001
0000000
?
1100000
0000100
0000000
0000100
1000000
0000000
1000000
?
1111001
0001100
0000000
1000000
1000110
0100000
1000100
?
0000001
0000100
1110100
0010000
1000110
0000001
0000100
?
0000001
...

result:

points 1.0 points  1.0 correct, 7 queries

Test #69:

score: 11
Accepted
time: 32ms
memory: 3740kb

input:

10
60
70
73
80
70
73
73
68

output:

?
0000000000
0100000000
1001000000
1000010000
0000000000
0000000100
1000001000
0000101000
0000000000
0000000000
?
0000100000
0100000000
1000000000
0000010000
0000000000
0000000100
0000001000
0000001000
0000000000
0000001001
?
0000001000
0000000000
0001000000
1000010100
0000000000
0000000100
10000010...

result:

points 1.0 points  1.0 correct, 8 queries

Test #70:

score: 11
Accepted
time: 22ms
memory: 3728kb

input:

10
80
93
84
52

output:

?
0000000000
0000000001
0000000001
0000000100
0000000000
0100000000
0100000000
0000000001
0000000001
0000100010
?
0010100100
0000000001
0000000001
0000000100
0010010001
0100000000
0000000000
0000000001
0001000000
0000100000
?
0000001000
0000000000
0000000001
0000000100
0110010111
0100000000
01000000...

result:

points 1.0 points  1.0 correct, 4 queries

Test #71:

score: 11
Accepted
time: 54ms
memory: 3608kb

input:

10
52
76
68
79
85
65
85
90
80
79
94
100

output:

?
1000000000
0000000011
0000000000
0000001000
0000000000
0000000000
0000100000
0000001000
0000000101
0000100000
?
1000000100
0001000011
0100000000
0000011000
0000010000
0000000000
0000100000
0000001000
0000000001
0000110000
?
1000000000
0001000001
0100000000
0000001000
0000000001
0000000000
00000000...

result:

points 1.0 points  1.0 correct, 12 queries

Test #72:

score: 11
Accepted
time: 24ms
memory: 3860kb

input:

10
58
68
92
92
82
75

output:

?
0000100000
0001110001
0000000100
0000000000
0000000000
0100000000
0000000000
0000100000
0000000000
0000000000
?
0000000000
0001110001
0000000100
0000000000
0001000001
0100000000
0000000000
0000000001
0000000000
0000010000
?
0100000000
0100110001
0000000100
0001000000
0001000000
0100000000
10000000...

result:

points 1.0 points  1.0 correct, 6 queries

Test #73:

score: 11
Accepted
time: 59ms
memory: 3892kb

input:

10
51
85
65
76
76
90
88
80
96
82
76
85
46
92

output:

?
0000001010
0000000000
1000001000
0010100000
0000000000
0000010000
0100000000
0010000000
0000000000
0000100000
?
0000000010
1000001000
0000000000
0000100100
0000000000
0000010000
0100000011
0010011010
0000000000
0000000100
?
0000000010
0000001000
0000001000
0000000000
0000010000
0000010000
00000000...

result:

points 1.0 points  1.0 correct, 14 queries

Test #74:

score: 11
Accepted
time: 57ms
memory: 3672kb

input:

10
68
58
82
76
76
90
65
82
86
92
80
82
90

output:

?
0000101000
0000000100
0000010000
0000001100
0000000000
0000000010
0000000000
0010000001
0000000000
0000000000
?
0100101100
0000000100
0000010000
0000000100
0000000000
0000000000
0100000000
0010000100
0000000000
0000000000
?
0100001100
0000000000
0000010000
0000101100
0000000000
0000000010
01000000...

result:

points 1.0 points  1.0 correct, 13 queries

Test #75:

score: 11
Accepted
time: 63ms
memory: 3672kb

input:

10
58
28
51
58
79
85
70
70
65
76
72
82
75

output:

?
0100010001
0000000000
0000000001
0000000001
0000001000
0010000000
0000000000
0000010000
0010000010
0000000000
?
0100010001
0000000000
0000000000
0000000000
0000000000
0010000000
0000000000
0000000000
0010000000
0000000000
?
0100010011
0000000000
0000000001
0000010001
0000001000
0001000000
00000000...

result:

points 1.0 points  1.0 correct, 13 queries

Test #76:

score: 11
Accepted
time: 37ms
memory: 3648kb

input:

5
23
16
17
23
16
22
23
21
19
21
25

output:

?
10000
11110
01000
01000
01001
?
10000
00010
00010
01000
00010
?
10000
10101
00010
00000
00000
?
10000
10010
01010
10000
01011
?
00000
11001
00001
00001
00000
?
01000
00001
11011
10101
00001
?
11000
00110
00001
01001
01010
?
10000
10011
10001
01001
10100
?
11011
00000
00000
00000
11000
?
00011
0001...

result:

points 1.0 points  1.0 correct, 11 queries

Subtask #3:

score: 65.8261
Acceptable Answer

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Test #77:

score: 78
Accepted
time: 3ms
memory: 3628kb

input:

3
9
9

output:

?
110
100
100
?
010
010
011
!
010
100
100

result:

points 1.0 points  1.0 correct, 2 queries

Test #78:

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

input:

3
9
9

output:

?
111
000
010
?
001
111
001
!
101
010
000

result:

points 1.0 points  1.0 correct, 2 queries

Test #79:

score: 78
Accepted
time: 3ms
memory: 3692kb

input:

3
5
7
7
6

output:

?
000
010
111
?
111
010
010
?
010
101
010
?
011
101
000
!
001
001
001

result:

points 1.0 points  1.0 correct, 4 queries

Test #80:

score: 78
Accepted
time: 4ms
memory: 3604kb

input:

3
8
7
8
9
7
9

output:

?
101
100
100
?
011
001
001
?
010
010
111
?
111
000
100
?
110
000
010
?
010
101
100
!
011
000
100

result:

points 1.0 points  1.0 correct, 6 queries

Test #81:

score: 78
Accepted
time: 5ms
memory: 3660kb

input:

3
5
7
7
7
9
8

output:

?
010
010
010
?
000
111
100
?
110
100
100
?
010
001
011
?
001
011
001
?
110
111
000
!
001
001
001

result:

points 1.0 points  1.0 correct, 6 queries

Test #82:

score: 78
Accepted
time: 3ms
memory: 3664kb

input:

3
6
5

output:

?
010
110
010
?
001
001
101
!
000
111
000

result:

points 1.0 points  1.0 correct, 2 queries

Test #83:

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

input:

3
7
9
8
7

output:

?
101
000
111
?
111
001
000
?
001
010
110
?
000
111
001
!
111
000
000

result:

points 1.0 points  1.0 correct, 4 queries

Test #84:

score: 78
Accepted
time: 3ms
memory: 3692kb

input:

3
6
9

output:

?
000
111
001
?
111
000
000
!
111
000
000

result:

points 1.0 points  1.0 correct, 2 queries

Test #85:

score: 78
Accepted
time: 4ms
memory: 3592kb

input:

3
7
9
6

output:

?
111
000
010
?
100
101
100
?
001
011
011
!
100
100
100

result:

points 1.0 points  1.0 correct, 3 queries

Test #86:

score: 78
Accepted
time: 4ms
memory: 3624kb

input:

3
9
5
9
9

output:

?
010
011
010
?
100
100
100
?
011
110
100
?
000
011
101
!
010
001
010

result:

points 1.0 points  1.0 correct, 4 queries

Test #87:

score: 78
Accepted
time: 2ms
memory: 3656kb

input:

3
8
7
9
8

output:

?
001
001
011
?
000
001
111
?
100
101
010
?
010
110
110
!
000
101
010

result:

points 1.0 points  1.0 correct, 4 queries

Test #88:

score: 78
Accepted
time: 4ms
memory: 3588kb

input:

3
7
8
7
8
6
8

output:

?
010
011
010
?
111
001
000
?
100
000
111
?
100
011
110
?
010
110
000
?
011
000
101
!
001
001
010

result:

points 1.0 points  1.0 correct, 6 queries

Test #89:

score: 78
Accepted
time: 5ms
memory: 3664kb

input:

3
7
7
8
5
7
5
5

output:

?
001
011
001
?
110
010
010
?
100
111
000
?
000
000
111
?
011
010
001
?
111
000
000
?
000
011
000
!
100
001
010

result:

points 1.0 points  1.0 correct, 7 queries

Test #90:

score: 78
Accepted
time: 4ms
memory: 3664kb

input:

3
7
8
9
7
5
9

output:

?
000
010
111
?
101
101
001
?
011
011
010
?
100
101
100
?
010
010
000
?
010
100
111
!
001
001
010

result:

points 1.0 points  1.0 correct, 6 queries

Test #91:

score: 78
Accepted
time: 5ms
memory: 3656kb

input:

3
7
7
7
8
9
8

output:

?
001
001
011
?
011
010
010
?
100
110
100
?
000
010
111
?
011
110
000
?
101
001
011
!
001
000
110

result:

points 1.0 points  1.0 correct, 6 queries

Test #92:

score: 78
Accepted
time: 5ms
memory: 3884kb

input:

3
7
7
8
9
9

output:

?
010
000
111
?
111
000
010
?
100
010
101
?
010
011
010
?
100
100
111
!
010
100
010

result:

points 1.0 points  1.0 correct, 5 queries

Test #93:

score: 78
Accepted
time: 5ms
memory: 3820kb

input:

3
7
8
7
7
8
9

output:

?
001
001
011
?
001
111
001
?
010
011
011
?
100
101
100
?
000
011
111
?
110
010
111
!
010
100
001

result:

points 1.0 points  1.0 correct, 6 queries

Test #94:

score: 78
Accepted
time: 23ms
memory: 3820kb

input:

10
70
50
90
80
40

output:

?
0000000011
0000000000
0000001000
0000000000
0100000000
0000001000
0000000010
0001000000
1000011000
0000000000
?
0000000011
0000000000
0000000000
0000000000
1100000000
0000000000
0010000010
0001000000
1000011000
0000000000
?
0000000010
0001001000
0000001000
0011100100
0100000000
0000000000
00000000...

result:

points 1.0 points  1.0 correct, 5 queries

Test #95:

score: 78
Accepted
time: 25ms
memory: 3724kb

input:

10
60
70
70
80
80

output:

?
0100000000
0000100000
0000001101
1000100001
0000000000
0000000000
0000000000
0000100000
1000000000
0000000000
?
0100000000
0000000000
0000001101
1000100000
0000000000
0000000100
0010000000
0000100000
0010000000
0000000000
?
0100000000
0000100000
0000001001
0000100000
0000000000
0000100000
00000000...

result:

points 1.0 points  1.0 correct, 5 queries

Test #96:

score: 78
Accepted
time: 15ms
memory: 3612kb

input:

10
80
70
60

output:

?
1100000000
0001000000
0000100000
0100000000
0000000100
0100000000
0000000100
0000000000
0000000010
0000000000
?
0000000000
0001000000
0000100000
0000001000
0000000000
0100000000
0000000100
0010111011
0000000000
0001010001
?
0000000000
0001000000
0000100000
0000000000
0000000000
0100000000
00000000...

result:

points 1.0 points  1.0 correct, 3 queries

Test #97:

score: 78
Accepted
time: 42ms
memory: 3664kb

input:

10
82
92
90
76
92
84
92
40

output:

?
0000000000
0000000010
0100000000
1000000000
0001000000
0000000100
0100000000
0000001100
0000100000
0000000010
?
0000000000
0000010010
0100000000
1000000010
0001000000
0000001000
0100000000
0000001100
0010110000
0000000100
?
0100000000
0000011000
0100000000
1000000011
0001000000
0000000100
00000000...

result:

points 1.0 points  1.0 correct, 8 queries

Test #98:

score: 78
Accepted
time: 41ms
memory: 3612kb

input:

10
68
76
93
94
82
93
64
96
84
65

output:

?
0000000100
0000000000
0000000100
0000000000
1000001000
1000000000
0010000100
0010000000
0000000001
1000000000
?
0100000100
0100000000
0001000100
0010000000
1000000000
1000000000
0000000000
0000000000
0000000001
1000000000
?
0101000100
0000000000
0001000000
0010000000
1000001000
1001001000
00100000...

result:

points 1.0 points  1.0 correct, 10 queries

Test #99:

score: 78
Accepted
time: 28ms
memory: 3676kb

input:

10
73
92
92
60
76
70

output:

?
0000000001
0010000000
0010000000
0000100000
0000000000
0010000000
0001000100
0000000000
0000000000
0001010000
?
0000000001
0010000000
0010000000
0000100000
0000000000
0010010000
1101000100
0000100000
0000100000
0011000000
?
0000000001
0010000000
0000000000
0000100000
0000001000
0000010000
11010000...

result:

points 1.0 points  1.0 correct, 6 queries

Test #100:

score: 78
Accepted
time: 15ms
memory: 3672kb

input:

8
50
48
56
56
43

output:

?
00000000
00000001
00010000
00010000
00100000
01011001
00000001
00000000
?
00010000
00001000
00010000
00000000
00100000
01110010
00000001
00001011
?
01010000
00000001
00010000
00010000
00000000
01011010
00000000
10100101
?
11110100
00000001
00010000
00000000
00100000
01011010
00000001
10000010
?
00...

result:

points 1.0 points  1.0 correct, 5 queries

Test #101:

score: 78
Accepted
time: 47ms
memory: 3600kb

input:

10
65
68
85
70
90
64
90
90
85
76
72

output:

?
0000000000
0000000000
0100000000
0100010000
0000000001
0000000001
0000100000
1000000000
1000000000
0000000100
?
0000000000
0000000000
0100000000
0100010000
0000000001
0000000000
0000100000
0000000100
1000000010
0000000100
?
0000000000
0000000000
0110000000
0100010000
0001000001
0000001001
00001000...

result:

points 1.0 points  1.0 correct, 11 queries

Test #102:

score: 78
Accepted
time: 47ms
memory: 3660kb

input:

9
61
57
60
73
57
72
63
61
61
51
78
73
32
69

output:

?
000100000
000001000
000000010
000100000
101000000
000000000
000000100
010000001
010000000
?
000100000
000001000
000010010
000000000
100000000
000000000
000000100
010000001
010000000
?
000100000
000010000
000010010
000101000
100000000
000000000
000000000
010000000
010000000
?
000100010
000110000
00...

result:

points 1.0 points  1.0 correct, 14 queries

Test #103:

score: 78
Accepted
time: 61ms
memory: 3656kb

input:

10
64
75
65
85
70
90
90
88
96
88
80
79
91
75

output:

?
0000000000
1000000000
0000000000
0000000010
0100000000
0100000010
0000000001
0000101000
0000000010
0000001000
?
0000000000
1000000000
0000000000
0000000010
0100100000
0000000010
0000000001
0000100000
0000000010
0000011000
?
0100000000
0000000000
0000000000
0001000010
0100000000
0100000000
00000000...

result:

points 1.0 points  1.0 correct, 14 queries

Test #104:

score: 78
Accepted
time: 21ms
memory: 3896kb

input:

10
73
90
88
88

output:

?
0000000010
0100000000
0000110010
0000000001
0000100000
0000000000
0000000000
0000000000
0000000100
0010000000
?
0000000010
0100000000
0000100010
1000000001
1000000000
0000000001
0000011000
0000000000
0000000100
1010001000
?
0001000000
0100000000
0000010010
0000000001
0000100000
0000001001
00000100...

result:

points 1.0 points  1.0 correct, 4 queries

Test #105:

score: 78
Accepted
time: 42ms
memory: 3740kb

input:

10
64
60
84
76
94
84
86
72
76

output:

?
0001000000
0000100001
0000000000
0000010000
0000000000
0100000000
0000100000
1000000000
0000100000
0000100000
?
0001000000
0000000001
0000000000
0000000000
0000000000
0000000100
0000000000
0000000000
0000100000
1100100000
?
0001000000
0000100001
0000000000
0000010000
0000000001
0100000100
00001000...

result:

points 1.0 points  1.0 correct, 9 queries

Test #106:

score: 78
Accepted
time: 13ms
memory: 3896kb

input:

10
80
60
50

output:

?
0000000000
0001000000
0100000000
0000000000
0000010100
0010000000
0000000000
1100100010
0000100000
0000000000
?
0000000001
0000000000
0000000001
0000001000
0000010101
0000000000
0000000001
1000000001
0000100000
0000000000
?
0000001001
0000000000
0000000000
0000000000
0000010000
0010000001
00000000...

result:

points 1.0 points  1.0 correct, 3 queries

Test #107:

score: 78
Accepted
time: 56ms
memory: 3632kb

input:

10
68
65
64
86
91
65
86
86
88
64
64
65
68

output:

?
0010000100
0000000001
0000000001
0000010000
0010000000
0000000000
0000000000
0000010000
0100001010
0000000000
?
1010000100
0000000100
0000000001
0000000000
0010000000
0000000000
0000000000
0000000000
0100001010
0000100000
?
0010000000
0000000000
0000000001
0100010000
0010000000
0000000000
00000000...

result:

points 1.0 points  1.0 correct, 13 queries

Test #108:

score: 78
Accepted
time: 26ms
memory: 3740kb

input:

10
50
86
82
64
92
94
91

output:

?
0001000000
0000000000
0000000000
0000000000
0000000000
0001000010
0000000100
1000110001
0000000000
0010000100
?
0001000000
0100000000
0011000100
0100011000
0000010000
0001000000
0000000100
0000100000
0000000000
0000000100
?
0001000000
0000001000
0010000100
0100011100
1000110000
0001000000
00000001...

result:

points 1.0 points  1.0 correct, 7 queries

Test #109:

score: 78
Accepted
time: 27ms
memory: 3728kb

input:

10
73
91
82
84
82
84
76
94

output:

?
0101000000
0000000000
0000000100
0000001000
0000000000
0000010000
0000010100
1000000000
0001000000
1000000000
?
0101000000
0010000000
0001000000
0000001000
0000010000
0000010000
0000010000
1000000100
0001000001
1100000000
?
0101000000
0000000000
0000100100
0000110000
0000000001
0000000100
00000001...

result:

points 1.0 points  1.0 correct, 8 queries

Test #110:

score: 78
Accepted
time: 47ms
memory: 3632kb

input:

10
55
84
93
82
82
88
60
60
82
80
90
88
96

output:

?
0001000000
0001000000
1000000000
0000100000
0000000000
0000000000
0000010000
0000000010
0000010000
0011100000
?
0001000001
1000000000
1000000100
0000000000
0100000000
0000000000
0000000000
0010000010
0100010000
0011100001
?
0000000000
1000000000
1000001100
0000100000
0000000000
0000000000
00000010...

result:

points 1.0 points  1.0 correct, 13 queries

Test #111:

score: 78
Accepted
time: 22ms
memory: 3612kb

input:

10
50
90
88
94
75
80
46

output:

?
0000010000
0000010000
0000000001
1000010000
0000000000
0001000000
0000000100
1000010000
0000000000
0000000001
?
0010000000
0000000000
0000001001
0000010010
0000000000
0011000000
0000000100
1010000000
0000000000
0000101000
?
0100000000
0110000000
0000000000
0100000010
0100000000
0101000000
01000001...

result:

points 1.0 points  1.0 correct, 7 queries

Test #112:

score: 78
Accepted
time: 33ms
memory: 3636kb

input:

10
70
64
73
82
44
68
88
85
52

output:

?
0000000000
0100001000
0000001000
0000000000
0000000000
0001100000
1010010000
0010000000
0000000000
1000000000
?
0000000000
0100101000
0000001000
0000000000
0000000000
0000100000
1010010001
0010000000
0000000000
0000000000
?
0000000000
1100101000
0010000000
0000000000
0000000000
0001000000
00100100...

result:

points 1.0 points  1.0 correct, 9 queries

Test #113:

score: 78
Accepted
time: 39ms
memory: 3656kb

input:

10
60
64
68
86
64
80
85
72
72
80
65

output:

?
0000000000
0010010000
0000001010
0000010000
0000000001
0000000000
0000000000
0001001000
0000000000
0000001000
?
0000000000
0000010000
0000001000
0000010000
0100000001
0000000000
0000000000
0001001000
0001000000
0000001010
?
0001000000
0010010000
0000001110
1000000000
0100000001
0000000000
00000000...

result:

points 1.0 points  1.0 correct, 11 queries

Test #114:

score: 78
Accepted
time: 57ms
memory: 3664kb

input:

10
52
68
79
79
94
76
84
76
82
88
65
100

output:

?
0000000000
0000000000
0000000000
0000000001
0100010000
0100000000
0001100000
0100000000
0000000000
0100000000
?
0000000000
0000000000
0000000000
0000000001
0101010001
0110000000
0001100010
0000000000
0000000000
0100000000
?
0000000000
1000000000
0000000100
0000000001
0001010011
0000000000
00001000...

result:

points 1.0 points  1.0 correct, 12 queries

Test #115:

score: 78
Accepted
time: 36ms
memory: 3600kb

input:

10
60
64
68
92
84
93
86
93
93
72

output:

?
0010000000
0000000000
0100000000
0000000000
1100000000
0000100100
0000000000
0001001000
0000000000
0010000000
?
0001000000
0000000100
0100000000
0000000000
0100000000
0000110100
0000000000
0001001000
0000000000
0010001000
?
0011000100
0000000100
0100000000
0000000000
1100000000
0000100100
00000000...

result:

points 1.0 points  1.0 correct, 10 queries

Test #116:

score: 78
Accepted
time: 48ms
memory: 3668kb

input:

10
58
51
82
65
84
84
84
68
60
76

output:

?
0000010001
0100000100
0100000000
0001000000
0000000000
0000000000
0001001000
0000000000
0000000000
0000000100
?
0010010000
0001000000
0100000001
0001000000
0000000000
0000000000
0001000000
0000000000
0000000000
0000000100
?
0010000001
0101000101
0000100001
0001000000
0000000000
0000000000
00010010...

result:

points 1.0 points  1.0 correct, 10 queries

Test #117:

score: 78
Accepted
time: 69ms
memory: 3612kb

input:

10
65
65
76
58
82
76
88
96
88
80
96
94
92
94
88

output:

?
0010000000
0000000010
0000000000
0010101000
0001000000
0000001000
1000000000
0000000011
0000000000
0000000000
?
0010000000
0000000010
0000000000
0010101000
0000000000
0000000000
1100000000
0000000010
0000000010
0000000000
?
0110000000
0000000010
0000000000
0000100000
0001000000
0000101000
11000100...

result:

points 1.0 points  1.0 correct, 15 queries

Test #118:

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

input:

10
51
70
58
64
80
36
60
88
72
92
95
93
88
80
80
82
70
91

output:

?
0100000001
0000000001
0000000000
0100000000
0100000000
0000000000
0000010001
1000010000
0000000010
0000000000
?
0100000000
0100000000
0000000000
0100000000
0100001000
0000100000
0000010001
1000010000
0000000010
1000000100
?
0000000000
0000010001
0000000000
0100000000
0000001000
0000000000
01000000...

result:

points 1.0 points  1.0 correct, 18 queries

Test #119:

score: 78
Accepted
time: 58ms
memory: 3596kb

input:

10
72
68
85
100
85
92
65
82
75
95

output:

?
0001000000
0000000000
1000000000
0100000000
0000010100
0001000001
0000000000
0100001000
0100000000
0000000000
?
0001000000
0000000000
1010000000
0100000000
0000010000
0001000000
0001000000
0000000000
0100000000
0000000010
?
0001000000
0000000000
1000000000
0110000000
0000110100
0000000001
00010000...

result:

points 1.0 points  1.0 correct, 10 queries

Test #120:

score: 78
Accepted
time: 32ms
memory: 3640kb

input:

10
50
60
91
55
84
92
68

output:

?
0000010000
0000000000
0000000000
0000000010
0000000000
0000000000
0000000011
0000000000
1010000000
0100001010
?
0000010000
0000000000
0100000010
0000001000
0001011101
0000001000
0000000010
0000000000
0000000000
0000000000
?
0000010000
0000000010
0110001010
0000001000
0001011101
0000000011
00000000...

result:

points 1.0 points  1.0 correct, 7 queries

Test #121:

score: 78
Accepted
time: 34ms
memory: 3892kb

input:

10
55
82
88
84
52
64
72
50

output:

?
0010100000
0000000000
1100001000
0010000000
0000001000
0000000000
1000000000
0000000100
0100000000
0000000000
?
0010000001
0000000001
1100000000
0010000000
0001101000
0000010000
0000000000
0000010100
0000000000
0000000001
?
0010100001
0000000001
1100000010
0000000000
0001101000
0000010001
00000000...

result:

points 1.0 points  1.0 correct, 8 queries

Test #122:

score: 78
Accepted
time: 45ms
memory: 3664kb

input:

9
53
57
65
74
75
65
60
65

output:

?
010000100
001000100
010000000
000000000
000000000
000000000
010001000
000000011
000000001
?
000000000
101001100
010000000
000000000
000000000
000000000
010000000
000000011
000000000
?
110011000
001001101
000100000
000000000
000000000
000000000
000001000
000000001
000000000
?
110011100
101000100
01...

result:

points 1.0 points  1.0 correct, 8 queries

Test #123:

score: 78
Accepted
time: 36ms
memory: 3888kb

input:

9
53
60
67
65
65
73
65

output:

?
000000000
110000010
010000001
000010100
000000000
000001000
100000000
001000000
000000000
?
001000000
110000011
000010001
000010100
000000000
000001000
000100000
001000000
000000000
?
001000000
110001011
010000001
000010000
001000000
000001000
001000000
001000000
000000000
?
000000000
110000000
01...

result:

points 1.0 points  1.0 correct, 7 queries

Test #124:

score: 78
Accepted
time: 31ms
memory: 3616kb

input:

8
46
43
58
64
58
40

output:

?
00000001
00000000
10010000
00000100
00101000
00000001
00000011
00000000
?
01000000
00000000
10010000
00000000
00101000
10000001
00000000
00000000
?
01010001
00000010
10010000
00010100
00101000
11000001
00000001
00000000
?
01010000
00000010
10011000
00010000
00100000
10000000
00000011
00100100
?
00...

result:

points 1.0 points  1.0 correct, 6 queries

Test #125:

score: 78
Accepted
time: 14ms
memory: 3616kb

input:

8
58
48
57

output:

?
10000001
01010010
00000001
00000000
00000001
00100000
00000001
01000000
?
01001111
00000010
00000000
00000010
00000001
00100000
00000000
01000000
?
10110101
00000011
00000001
00000110
00000000
00100000
00000001
01000000
!
00000001
00000010
00000001
00000010
00000001
00100000
00000001
01000000

result:

points 1.0 points  1.0 correct, 3 queries

Test #126:

score: 78
Accepted
time: 36ms
memory: 3616kb

input:

7
39
34
41
37
43
49
43
42

output:

?
0100000
0000001
0000101
0001100
0001000
0000010
0010100
?
0100001
0000001
0010001
0100100
0000000
0001010
0000100
?
0000001
1000000
0010101
0101101
0010000
0000010
0000000
?
0100001
1000000
0000100
0001100
0010000
0000000
1010000
?
0000100
0000000
0000101
0000001
0011000
1000010
0110100
?
0000000
...

result:

points 1.0 points  1.0 correct, 8 queries

Test #127:

score: 78
Accepted
time: 20ms
memory: 3664kb

input:

7
37
44
31
34
29
42

output:

?
0001000
0100000
0000001
1110010
0000000
0010000
1001000
?
0001000
0100100
0000001
1110010
0000000
0010010
0001000
?
0000000
0100100
0000000
1110011
0000000
0000001
1001000
?
0000000
0100000
0000000
0100000
0000111
0010001
1000000
?
0000000
0100001
0000000
0100000
1111101
0000000
0000000
?
0001000
...

result:

points 1.0 points  1.0 correct, 6 queries

Test #128:

score: 78
Accepted
time: 32ms
memory: 3664kb

input:

10
55
76
88
82
93
88
85
52

output:

?
0000000000
0000000000
0000000000
0001000000
0000000000
0010010000
1000000100
0000011000
0000000000
0100101000
?
0000000000
0000100000
0001000000
0000000000
0100000000
0000010000
1000000100
0000010000
0000000000
0100101100
?
1001001000
0000100000
0000000000
0001000000
0100000000
0010000100
00000001...

result:

points 1.0 points  1.0 correct, 8 queries

Test #129:

score: 78
Accepted
time: 39ms
memory: 3888kb

input:

10
68
55
86
68
92
84
82
100

output:

?
0000000000
0000000101
0000000000
0000100010
0010000000
0000000000
0000000010
0100010000
1000000000
0000000000
?
0000000000
0000000000
0000010000
0000100000
1010000001
0000000000
0000000000
0100010100
1000000000
0000000000
?
0000000000
1000000101
0000010010
1000010010
0010000001
0000000000
00000000...

result:

points 1.0 points  1.0 correct, 8 queries

Test #130:

score: 78
Accepted
time: 60ms
memory: 3636kb

input:

10
64
76
70
72
82
82
88
82
85
88
88
95
79
82

output:

?
0000000000
0000010000
0001000000
0000000000
0010000000
0000100000
0000010000
0100110000
0000000000
0000000100
?
0000000000
0000000000
0001000000
0000000000
0010000000
0000100000
0100010010
0100111000
0000000000
0000000100
?
0000000000
0000010000
1001000000
0010000000
0010000000
0000000000
01000100...

result:

points 1.0 points  1.0 correct, 14 queries

Test #131:

score: 78
Accepted
time: 60ms
memory: 3616kb

input:

10
58
76
76
80
79
80
84
88
80
97
82
80
65

output:

?
0000100001
0000000010
0010000000
0000100000
0000000100
0000000000
1000000010
0000000000
0000000001
0000000100
?
0000100000
0000000010
0010000000
0000100010
0000000100
0000101000
0000000010
0000000000
0000000001
0001000100
?
0000100001
0000101000
0010000000
0000100000
0000000000
0000101000
10000000...

result:

points 1.0 points  1.0 correct, 13 queries

Test #132:

score: 78
Accepted
time: 51ms
memory: 3892kb

input:

10
50
84
93
76
72
88
82
80
64
79
44

output:

?
0000000000
0010000000
0000000000
0000000100
0000000000
0000000000
0000000000
0001000110
0000000100
1000000000
?
0000000000
0010000000
0010000000
0000000110
0001100000
1000000000
0000000100
0001010110
0000000100
1000000000
?
0100000000
0010010000
0010000000
0000000100
0001101000
1000000000
10000000...

result:

points 1.0 points  1.0 correct, 11 queries

Test #133:

score: 78
Accepted
time: 65ms
memory: 3616kb

input:

10
58
58
64
65
80
75
76
80
76
90
94
92
76
70
90

output:

?
1000001000
0000000010
0000000000
0000000000
0000000000
0100100010
0000001001
0000000000
0010010000
0000000000
?
1000001000
0000000000
0000000001
0000000000
0000000000
0000100010
0000000001
0000000000
0001000000
0000000000
?
1000101000
0000000010
0000000001
0000001000
0000000000
0100000010
00000010...

result:

points 1.0 points  1.0 correct, 15 queries

Test #134:

score: 78
Accepted
time: 71ms
memory: 3668kb

input:

10
65
65
65
76
80
75
76
58
79
90
90
92
95
88
94
65

output:

?
0000000010
0000000000
0000000000
1000010000
0000000000
0100000100
0010000000
0000001001
0000000000
1000000000
?
0000000010
0000000000
0000000000
1000011100
0000000000
0100000100
0010000000
0000000001
0000000100
1000000000
?
0000000010
0000100000
0000000000
0000001100
0000000100
0000000100
00000000...

result:

points 1.0 points  1.0 correct, 16 queries

Test #135:

score: 78
Accepted
time: 208ms
memory: 3744kb

input:

100
1000
2000
2900
3500
5000
5600
6800
7300
7400
8800
9900
9900

output:

?
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

points 1.0 points  1.0 correct, 12 queries

Test #136:

score: 78
Accepted
time: 212ms
memory: 3776kb

input:

100
1000
1900
2700
3200
3400
5600
6500
6700
8000
8100
9400
9300

output:

?
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

points 1.0 points  1.0 correct, 12 queries

Test #137:

score: 78
Accepted
time: 412ms
memory: 3792kb

input:

100
991
1189
1387
1684
2476
2992
3016
2650
3113
2700
2919
3280
4471
5535
5345
7210
6504
7056
7816
7864
9100
8560
8362
6390
9256
7056
7332
7489

output:

?
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

points 1.0 points  1.0 correct, 28 queries

Test #138:

score: 78
Accepted
time: 609ms
memory: 4028kb

input:

100
886
984
984
1367
1486
1376
1916
2685
2574
2668
2292
3920
5032
2416
3514
3952
3430
2916
5424
3301
5194
4267
5464
5248
7489
5818
3994
6802
7540
7440
8383
7720
7396
7228
8800
7872
7867
8240
9384
6802
7732

output:

?
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

points 1.0 points  1.0 correct, 41 queries

Test #139:

score: 78
Accepted
time: 761ms
memory: 3808kb

input:

100
984
1000
1640
1840
1744
1634
2467
1755
2447
2811
2560
3357
3752
4288
3312
3880
3790
3388
4475
3910
5059
3070
5736
5408
5497
5464
6808
7048
5655
5933
4867
6808
5982
7568
7262
8504
8176
8225
9020
7941
6080
8944
5518
9764
9360
8137
8068
6775
7492
6920

output:

?
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

points 1.0 points  1.0 correct, 50 queries

Test #140:

score: 78
Accepted
time: 955ms
memory: 3868kb

input:

100
880
784
785
979
1360
979
1812
1446
1901
1720
2083
2432
2265
2696
2620
3028
1720
2944
2710
3439
3448
3206
4462
3760
3763
4817
3609
4820
5308
5840
5974
3625
4894
5248
3736
6523
5580
6288
5072
5520
6288
5998
5547
6900
7800
6192
7840
6736
7893
8176
7834
7678
8336
7165
8138
6650
8752
5255
7894
8590
8...

output:

?
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

points 1.0 points  1.0 correct, 69 queries

Test #141:

score: 78
Accepted
time: 1035ms
memory: 3756kb

input:

100
886
979
1270
1545
1352
1367
2265
1996
1916
2524
2696
2170
3115
3028
2872
3443
3448
2524
2800
4963
3127
4832
4456
3522
4148
4411
4610
4696
5580
6590
5660
6535
5176
6283
5580
7133
3443
6315
7991
7086
7390
7400
6757
8548
6436
6544
7462
8416
7615
7424
5716
8285
7705
7316
8684
8150
7965
8436
9064
858...

output:

?
0000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

points 1.0 points  1.0 correct, 69 queries

Test #142:

score: 75.3913
Acceptable Answer
time: 1104ms
memory: 3804kb

input:

100
880
592
793
1351
1164
1173
2079
1634
2168
1628
2692
2256
2265
3763
3030
2435
3844
3768
4540
4120
3625
4963
5104
5104
5590
5401
5791
5380
5752
5811
5310
5050
5852
7448
7300
7732
5970
7581
6784
6340
8372
8409
7705
7085
5980
7650
8252
6991
8416
7334
8160
7452
8956
8581
9449
9604
8746
7746
8713
7504...

output:

?
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

points 0.96655518390 points  0.9665551839 correct, 100 queries

Test #143:

score: 78
Accepted
time: 1009ms
memory: 4008kb

input:

100
880
785
979
1355
1352
1076
1816
2088
1909
2435
2432
2170
2435
3532
3048
2180
2784
2800
3400
2880
3147
4238
4735
3844
3880
5516
3736
4774
5457
6058
4640
4786
6532
4645
6688
6945
4832
6472
5260
7140
7228
7680
6706
8005
7420
7935
7109
8334
7549
8753
8285
8698
7900
7120
8695
8710
7024
7816
9550
8380...

output:

?
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

points 1.0 points  1.0 correct, 68 queries

Test #144:

score: 78
Accepted
time: 836ms
memory: 3796kb

input:

100
886
1168
984
1464
1640
1456
1446
1723
1992
2104
2890
3488
2480
3610
3503
4540
3340
4771
4356
4288
3880
4482
6022
5707
4482
6625
5919
3790
6522
6112
5545
7160
7060
5080
7586
7484
5920
6500
7595
8218
7706
8047
6876
8575
8782
8185
7644
9636
9632
4687
6475
7102
9712
5275
8650
6274
6652

output:

?
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

points 1.0 points  1.0 correct, 57 queries

Test #145:

score: 78
Accepted
time: 917ms
memory: 4024kb

input:

100
976
788
976
1355
1355
1444
1810
1351
2083
2524
2608
2791
2356
3312
3266
3609
3503
3214
3609
4306
4560
4312
3616
4720
5050
5693
5050
6570
5136
4522
6780
5813
6521
5440
6423
5457
4605
6619
7756
7076
5320
8841
7387
6048
5824
7480
8936
7960
6152
8950
4670
9706
7340
6850
9246
8048
7280
7144
6315
7144...

output:

?
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

points 1.0 points  1.0 correct, 61 queries

Test #146:

score: 78
Accepted
time: 748ms
memory: 4028kb

input:

100
882
979
976
1360
1648
1450
1540
1916
2281
2538
2560
2548
2692
3236
2456
3214
3292
3503
4288
4120
3710
3224
5059
4640
5734
5383
5149
5680
4424
5302
3980
6310
6818
7080
7984
7591
8344
7892
8321
6766
8929
7373
7620
7336
8218
7970
7550
4771
5162
5020

output:

?
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

points 1.0 points  1.0 correct, 50 queries

Test #147:

score: 78
Accepted
time: 456ms
memory: 4012kb

input:

100
984
991
1180
1768
1768
1949
2800
2685
3445
3702
3284
1735
4540
3397
3608
5410
3420
5860
5206
7448
6850
6906
7624
6542
7179
8968
7117
8944
7825
4388
7570

output:

?
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

points 1.0 points  1.0 correct, 31 queries

Test #148:

score: 78
Accepted
time: 312ms
memory: 3796kb

input:

100
900
1800
2800
2552
3367
3728
4555
4456
3961
5100
6337
7381
8157
7942
9515
8752
4708
9021
8843
8108
9440
5850
8076
8670
9695
9594
7723
6328
9859
4792
9406
9088
6992
9595
8648
8648
9264
9120
8284
3127
4050
8873
8650
8218
8680
9186
2948
6767
9681
8811
6449
9320
3414
9001
8880
9940
3440
9680
8670
99...

output:

?
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

points 1.0 points  1.0 correct, 83 queries

Test #149:

score: 76.087
Acceptable Answer
time: 380ms
memory: 3740kb

input:

100
1000
1700
2700
3700
4456
4753
5100
5248
6040
7426
8317
8812
9321
7381
9520
7216
5968
6374
6616
7888
9021
6904
9289
6770
9724
9808
9829
2953
3430
8218
9862
9770
6300
9020
9013
9100
8684
7010
7648
6067
8556
9870
7448
8056
3680
9954
9920
8975
6940
8250
9252
9972
9987
7885
9990
5255
2613
5450
8720
6...

output:

?
0000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

points 0.97547380160 points  0.9754738016 correct, 96 queries

Test #150:

score: 72.7826
Acceptable Answer
time: 376ms
memory: 3768kb

input:

100
900
1800
2800
3500
4500
5400
6436
5590
5492
6436
7575
7648
7746
9224
9620
8290
9172
5150
8856
8843
7162
8160
8950
9860
8560
7720
8392
7151
9829
9640
5634
9688
7008
6226
6078
3440
8712
200
9154
6940
8048
9342
5059
8731
9936
9475
9896
9850
9422
8985
1165
4006
8770
8656
8470
9892
9949
9100
9496
986...

output:

?
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

points 0.93311036790 points  0.9331103679 correct, 115 queries

Test #151:

score: 73.6522
Acceptable Answer
time: 372ms
memory: 3788kb

input:

100
1000
1783
2300
3169
3466
4951
5842
6832
6733
7844
8254
6436
6508
7921
9712
5100
9043
6087
7427
6520
8704
7790
9112
9370
9685
9886
6990
8980
6555
9530
9724
8488
8920
8440
9613
9964
9815
9928
7732
7669
9140
9202
9808
4832
2079
7933
7286
8925
9200
9880
9958
9652
7564
2431
9850
3763
9940
8155
4384
9...

output:

?
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000...

result:

points 0.94425863990 points  0.9442586399 correct, 110 queries

Test #152:

score: 75.5652
Acceptable Answer
time: 442ms
memory: 3800kb

input:

100
991
1288
1684
1882
2500
3500
4357
4555
6337
4000
8218
9010
9706
9510
7723
8765
6052
6448
5008
7912
6974
4296
9376
8229
9361
9148
7696
9292
8800
9643
6490
9050
9154
6516
8110
9932
9649
3360
8695
9571
6136
8980
4524
8920
8912
9811
9791
2860
8632
8320
9972
8752
7928
9655
2356
9960
9904
5968
7348
99...

output:

?
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

points 0.96878483840 points  0.9687848384 correct, 99 queries

Test #153:

score: 73.4783
Acceptable Answer
time: 386ms
memory: 3796kb

input:

100
800
1800
2600
3400
4600
5248
4852
5100
6900
7822
8812
9307
9808
6799
9136
5786
7408
5908
9065
7900
9475
9208
8362
3928
8620
7192
9316
9376
8515
5242
9523
9582
8947
8650
7920
5896
4376
8712
8919
8320
3048
9000
9839
5712
9370
9690
9064
7216
1723
9986
6696
9692
9800
6750
7456
9970
6889
6920
2604
19...

output:

?
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

points 0.94202898550 points  0.9420289855 correct, 111 queries

Test #154:

score: 68.4348
Acceptable Answer
time: 583ms
memory: 3744kb

input:

100
1000
1981
1900
2278
3016
2454
2608
3920
4078
4048
3088
4848
4234
3702
5086
5590
4924
5359
5350
6707
7120
7888
8152
7976
6832
7620
6832
8488
8908
9440
5872
6520
8606
6880
7540
8827
9472
8878
9776
7052
7792
2702
7660
8020
9441
7420
9356
9436
6843
7348
9145
7516
1812
7600
7165
1909
9804
9520
9769
7...

output:

?
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

points 0.87736900780 points  0.8773690078 correct, 140 queries

Test #155:

score: 66.5217
Acceptable Answer
time: 667ms
memory: 4004kb

input:

100
976
785
976
979
1270
1755
1658
2416
1658
3350
4172
4572
4722
4112
3376
3514
2856
5860
4927
5230
6580
7960
4642
6542
7850
5770
6832
8461
6529
7228
8056
8589
5872
9461
5860
5869
7003
7675
7854
4960
6366
9814
6226
7264
9505
9664
9460
9064
9168
9730
8450
8860
1909
8850
5972
9412
9864
9808
7972
9552
...

output:

?
0000000000000000000000000000000000000000000000101000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

points 0.85284280940 points  0.8528428094 correct, 151 queries

Test #156:

score: 78
Accepted
time: 314ms
memory: 3788kb

input:

100
900
1800
2700
3400
4700
5644
5100
5743
7426
6400
8432
7822
8236
9804
8530
4708
8487
7272
8278
7270
9796
9740
8416
9040
7768

output:

?
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

points 1.0 points  1.0 correct, 25 queries

Test #157:

score: 78
Accepted
time: 1072ms
memory: 3780kb

input:

100
886
979
1072
1168
1648
1992
2524
1355
2613
2346
2608
2696
3292
3850
2530
4320
4525
4963
3932
3609
5042
4540
3692
6106
5669
4528
5842
5190
6645
5998
5212
7305
4960
5908
7744
6346
5255
6932
6436
8020
8206
7960
6724
7816
7777
8176
8740
7920
7880
9439
8368
8073
8543
7668
9050
8908
7408
8688
8260
935...

output:

?
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

points 1.0 points  1.0 correct, 69 queries

Test #158:

score: 78
Accepted
time: 1155ms
memory: 3800kb

input:

100
975
494
785
788
1355
1728
1258
1822
1723
2188
2088
2791
1540
1816
3370
3616
3206
3522
4379
4080
4249
4680
3443
4024
4228
4604
4900
4320
3680
4750
5842
5644
6181
5248
5226
6436
7011
6685
6685
7312
5050
6900
7760
6979
8000
7678
8050
7764
3996
5385
7120
7102
5308
8524
9136
7360
7360
7378
8206
9379
...

output:

?
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000...

result:

points 1.0 points  1.0 correct, 81 queries

Test #159:

score: 78
Accepted
time: 1077ms
memory: 3800kb

input:

100
976
984
1540
784
1723
1720
2168
975
2083
2256
1270
2524
2265
1901
3448
2690
3550
4072
3127
4320
3844
4960
3364
5328
5200
4963
4975
4671
6157
5376
5970
5842
6425
5450
6814
5860
7744
6760
7150
6640
5036
7390
7888
5320
8360
7150
7732
8039
9320
8050
7415
8308
9090
9544
9296
8985
8920
8884
9150
7635
...

output:

?
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

points 1.0 points  1.0 correct, 79 queries

Test #160:

score: 77.6522
Acceptable Answer
time: 1200ms
memory: 3736kb

input:

100
976
979
1173
1352
1446
1540
1723
2088
2260
2364
2170
2613
2692
2530
3532
1949
3280
2613
3285
2356
4384
3917
4746
4225
4306
4320
2776
5100
6283
5970
5840
3576
6248
6991
7100
6976
6880
6820
7470
6814
8167
5380
7705
6950
8236
7448
8176
5800
7332
7088
7991
8729
5784
8713
6865
8372
9349
6160
5846
875...

output:

?
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

points 0.99554069120 points  0.9955406912 correct, 87 queries

Test #161:

score: 65.8261
Acceptable Answer
time: 1227ms
memory: 3972kb

input:

100
976
784
976
788
1165
1537
1352
1444
1536
1536
1901
2432
1360
2002
1537
3112
1728
3194
2953
1909
2862
3917
2520
3840
4376
4080
3196
2518
4968
4075
3840
4975
5116
5860
4533
6047
5811
5584
6555
4908
5791
5912
6645
6828
6352
7470
7549
6580
5811
7415
7936
4462
8245
8290
4825
6873
8080
7300
8746
4968
...

output:

?
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

points 0.84392419180 points  0.8439241918 correct, 155 queries

Test #162:

score: 78
Accepted
time: 240ms
memory: 3812kb

input:

100
800
1600
2300
3200
3700
4800
4800
5300
7600
8614
8218
5600
8119
8317

output:

?
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

points 1.0 points  1.0 correct, 14 queries

Test #163:

score: 78
Accepted
time: 247ms
memory: 3772kb

input:

100
1000
1800
2200
3400
3700
4700
6500
6400
7200
9000
9200
7723
9010

output:

?
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

points 1.0 points  1.0 correct, 13 queries

Test #164:

score: 78
Accepted
time: 226ms
memory: 3776kb

input:

100
1000
2000
2600
3600
4000
5900
6600
6800
6200
8800
9300
8000

output:

?
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

points 1.0 points  1.0 correct, 12 queries

Test #165:

score: 78
Accepted
time: 223ms
memory: 4008kb

input:

100
1000
1800
2300
2900
3800
4900
5700
5800
7800
7000
9100
6000

output:

?
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

points 1.0 points  1.0 correct, 12 queries

Test #166:

score: 78
Accepted
time: 382ms
memory: 3756kb

input:

100
892
1189
1585
1866
1981
2773
2080
3986
3501
3728
4654
6160
5982
6544
4762
7910
6960
7504
6640
7396
7556
8765
6295
5112
4870

output:

?
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

points 1.0 points  1.0 correct, 25 queries

Test #167:

score: 78
Accepted
time: 261ms
memory: 4008kb

input:

100
900
1800
2700
3600
4357
4060
4555
4900
6535
7525
7822
8922
7624
7327
9505

output:

?
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

points 1.0 points  1.0 correct, 15 queries

Test #168:

score: 78
Accepted
time: 1042ms
memory: 3740kb

input:

100
976
785
975
975
788
1352
1540
1901
1901
1720
1812
2613
2174
2257
2720
2095
2538
2530
3952
2872
2524
2548
4356
4384
4312
4391
5086
5140
5611
4800
5950
5226
5242
5418
5953
4792
7595
5288
7516
5632
7417
7008
5766
7970
4600
5339
8804
7039
8318
7354
8284
5328
6820
9428
7960
9590
9262
9136
5708
8812
8...

output:

?
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

points 1.0 points  1.0 correct, 68 queries

Test #169:

score: 78
Accepted
time: 1092ms
memory: 3840kb

input:

100
975
784
784
784
592
1536
1536
1352
1352
1720
2079
1720
880
1352
2432
3364
1990
3360
2346
2350
3206
3692
2862
3292
3692
4225
3682
4000
2079
4628
5870
4168
3277
3850
6114
6248
4975
5722
4675
4411
6040
6544
6436
4900
6274
6784
6787
6230
6535
7965
8344
7492
5824
8272
7286
9354
8289
9400
8824
8202
89...

output:

?
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

points 1.0 points  1.0 correct, 74 queries

Test #170:

score: 78
Accepted
time: 1016ms
memory: 3884kb

input:

100
976
788
1072
1260
1355
1545
1552
1367
2538
2095
2467
2890
2447
3236
3952
2608
4087
4391
2969
4640
4628
3894
5102
5275
3700
5310
5896
5264
4391
4050
6230
5116
4560
7404
4400
7060
5527
5980
6900
7360
7872
7807
7424
7858
5536
7936
6047
8152
7920
6580
7942
8024
8824
9230
7991
9090
7312
9370
8040
907...

output:

?
0000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

points 1.0 points  1.0 correct, 68 queries

Test #171:

score: 78
Accepted
time: 1132ms
memory: 3804kb

input:

100
984
984
976
1270
1540
1450
2010
2346
2256
1540
2440
3378
2272
3526
2791
2431
3196
3932
3700
3364
4249
4312
4400
4024
4963
5584
4968
4610
4628
4533
6436
6544
6700
6523
7158
4107
7462
6706
7976
6220
7368
6838
4820
8068
4820
5584
7608
7492
8409
7936
8496
8800
8720
5980
8890
8214
8560
8992
9195
9316...

output:

?
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000...

result:

points 1.0 points  1.0 correct, 73 queries

Test #172:

score: 78
Accepted
time: 1059ms
memory: 3824kb

input:

100
979
979
984
1260
1444
1735
1822
1810
2188
2440
2862
3686
2692
3604
3692
2272
2524
4075
4072
4456
2260
3838
3277
4452
5050
5515
3200
5968
5842
4944
5800
6462
6490
7600
4968
6787
7450
7615
4756
7936
7720
7984
8323
7950
6984
7150
8214
8779
8884
6645
6172
8822
6724
9064
8840
9298
7764
9609
8530
9090...

output:

?
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

points 1.0 points  1.0 correct, 73 queries

Test #173:

score: 78
Accepted
time: 18ms
memory: 3888kb

input:

5
23
17
19
25
13
23
21
17

output:

?
00100
10000
10000
10010
01001
?
10100
00100
10000
10100
00000
?
10100
01000
01000
10000
00000
?
00100
00100
00100
00100
01101
?
01000
01000
01100
00000
00001
?
00000
00010
10000
10011
01101
?
00100
10000
10000
10001
01000
?
00000
00000
10000
10000
00101
!
00100
10000
00100
10000
01000

result:

points 1.0 points  1.0 correct, 8 queries