QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#796713#9783. Duloc Networkucup-team1264#RE 109ms23040kbPython31.5kb2024-12-02 00:36:592024-12-02 00:37:00

Judging History

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

  • [2024-12-02 00:37:00]
  • 评测
  • 测评结果:RE
  • 用时:109ms
  • 内存:23040kb
  • [2024-12-02 00:36:59]
  • 提交

answer

import random
from math import comb
from functools import cache
n = int(input())

@cache
def inner_query(s: frozenset):
    q = ''.join(['1' if i in s else '0' for i in range(n)])
    print('?', q, flush=True)
    return int(input())

def query(s: set):
    return inner_query(frozenset(s))

# deg = [query({i}) for i in range(n)]

u = random.sample(range(n), 1)[0]
now = {u}
rem = set(range(n)) - now

def sample_num(now_deg: int, now_cand: int):
    if now_deg >= now_cand / 2 or now_deg <= 1:
        return 1
    
    now_mn, now_mni = 100000, 1
    for i in range(1, now_cand):
        prob = comb(now_cand - i, now_deg) / comb(now_cand, now_deg)
        exp = (now_cand - i) * prob + i * (1 - prob)
        if exp < now_mn:
            now_mn, now_mni = exp, i

    # print(f"DEBUG: {now_mn} {now_mni} {now_deg} {now_cand}")
    return now_mni
    


while len(now) < n:
    cand = rem.copy()
    conn_deg = query(now)
    if not conn_deg:
        print("! 0", flush=True)
        exit(0)
    if len(cand) == 1:
        now |= cand
        rem -= cand
        continue
    while True:
        sn = sample_num(conn_deg, len(cand))
        vs = set(random.sample(list(cand), sn))
        if query(now) + query(vs) == query(now | vs):
            cand -= vs
        else:
            conn_deg = (query(now) + query(vs) - query(now | vs)) // 2
            cand = vs
        
        if len(cand) == 1:
            now |= cand
            rem -= cand
            break

print("! 1", flush=True)

详细

Test #1:

score: 100
Accepted
time: 11ms
memory: 11028kb

input:

4
2
2
1
1
1

output:

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

result:

ok Correct answer with 5 queries.

Test #2:

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

input:

2
0

output:

? 10
! 0

result:

ok Correct answer with 1 queries.

Test #3:

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

input:

4
2
1
2
3
1

output:

? 0010
? 1000
? 1010
? 0100
? 1110
! 1

result:

ok Correct answer with 5 queries.

Test #4:

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

input:

2
0

output:

? 10
! 0

result:

ok Correct answer with 1 queries.

Test #5:

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

input:

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

output:

? 00000000000000000100000000000000000000000000000000
? 00000000000000000000000000000000010000000000000000
? 00000000000000000100000000000000010000000000000000
? 00000100000000000000000000000000000000000000000000
? 00000100000000000100000000000000000000000000000000
? 000000000000000000000000000000000...

result:

ok Correct answer with 261 queries.

Test #6:

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

input:

50
10
38
38
10
14
38
37
16
27
8
28
10
32
10
35
9
36
9
37
11
37
10
37
10
36
8
36
15
35
13
34
15
33
7
33
10
33
12
32
13
31
5
30
6
29
10
28
9
27
15
26
6
25
8
24
8
23
15
22
11
21
11
20
10
19
10
18
8
17
9
16
14
15
16
14
11
13
10
12
10
11
10
10
7
9
8
8
9
7
13
6
14
5
11
4
10
3
9
2
10
1

output:

? 00000000000000000000000000000001000000000000000000
? 00000110010000000000001010010000000010000001100000
? 00000110010000000000001010010001000010000001100000
? 00000010000000000000000000000000000000000000000000
? 00000010000000000000000000000001000000000000000000
? 001000000001000000100001000000000...

result:

ok Correct answer with 101 queries.

Test #7:

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

input:

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

output:

? 00000000000000000000000000000000000000100000000000
? 00000000000000100000000000000000000000000000000000
? 00000000000000100000000000000000000000100000000000
? 00000000000000000000000000010000000000000000000000
? 00000000000000000000000000010000000000100000000000
? 000000000000100000000000000000000...

result:

ok Correct answer with 68 queries.

Test #8:

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

input:

50
5
33
33
28
28
14
16
8
12
30
31
8
17
32
33
12
22
28
29
6
24
4
25
8
28
10
29
14
33
12
33
7
34
12
34
5
33
8
32
9
32
9
31
8
31
8
30
7
29
5
28
4
28
7
27
10
27
9
26
7
25
11
24
9
23
8
22
8
21
8
20
8
19
10
18
11
17
5
16
9
15
9
14
10
13
8
12
10
11
9
10
6
9
8
8
4
7
13
6
7
5
7
4
11
3
2
2
9
1

output:

? 00000000000000000000000000000000001000000000000000
? 00101000010001011001000000000010000001100011000001
? 00101000010001011001000000000010001001100011000001
? 00001000000001011000000000000000000000000010000000
? 00001000000001011000000000000000001000000010000000
? 000010000000010000000000000000000...

result:

ok Correct answer with 109 queries.

Test #9:

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

input:

50
3
18
19
2
5
1
4
1
4
1
4
1
4
2
5
2
5
1
4
3
6
2
5
1
4
2
3
16
19
10
13
7
8
1
2
10
12
11
11
2
4
3
2
4
4
3
5
1
3
1
3
1
3
4
1
1
1
2
3
4
2
2
1
2
1
2
5
6
1
2
2
3
1
2
3
4
1
2
3
1
2
2
1
2
1
2
4
1
2
3
1
2
1
2
2
3
4
3
3
2
3
4
2
2
2
1
2
1
2
1
0

output:

? 10000000000000000000000000000000000000000000000000
? 00101100001100000001000001110101110101000001000000
? 10101100001100000001000001110101110101000001000000
? 00000000000000000001000000000000000000000000000000
? 10000000000000000001000000000000000000000000000000
? 000000000010000000000000000000000...

result:

ok Correct answer with 111 queries.

Test #10:

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

input:

100
3
35
35
1
4
1
2
37
37
1
3
1
3
2
4
3
5
3
5
4
6
2
4
2
4
2
4
1
3
1
3
1
3
1
3
3
5
2
4
1
3
2
4
3
3
5
1
1
2
3
2
3
1
2
2
3
4
3
4
1
2
2
3
2
3
1
2
1
2
2
3
4
5
1
2
1
2
2
3
2
3
2
3
4
1
2
3
4
4
2
3
2
3
2
2
37
35
21
20
4
1
3
3
1
3
4
4
3
5
2
1
2
3
3
4
1
2
1
2
1
2
2
2
4
2
2
3
1
2
3
1
2
1
2
1
2
1
2
2
3
3
1
2
2
...

output:

? 0000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000
? 1111001000011000001001000000100010001010011000000100100100010011110000010011000010000011010100011000
? 11110010000110000010010000001000100010100110000001001001000100111100000100110100100000110101...

result:

ok Correct answer with 779 queries.

Test #11:

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

input:

100
5
69
68
53
53
22
24
11
15
65
68
42
49
13
26
51
61
9
33
48
58
8
38
45
62
10
43
37
66
6
46
42
61
11
53
6
58
8
59
16
66
9
66
6
65
9
67
9
68
7
67
8
68
8
68
10
71
11
72
6
72
8
71
8
71
8
70
10
71
10
71
12
70
11
70
6
69
9
68
12
67
7
66
9
65
16
64
8
63
10
62
12
61
6
60
7
59
13
58
5
58
5
57
12
56
11
55
1...

output:

? 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000
? 0100001001000110010001101000101100100000011000010000000000010000000000001010010000100110001001100001
? 01000010010001100100011010001011001000000110000100000000000100000000000010100100001001110010...

result:

ok Correct answer with 217 queries.

Test #12:

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

input:

100
4
46
47
3
7
2
6
1
5
4
8
5
9
3
7
5
9
3
7
2
6
2
6
3
7
5
9
5
9
6
10
6
10
2
6
4
8
2
6
5
9
1
5
3
7
1
5
4
7
46
46
22
28
9
12
2
9
1
8
5
11
39
38
11
16
2
12
31
39
22
33
1
13
5
17
2
14
15
4
16
3
15
19
22
36
10
27
20
21
2
19
29
40
6
24
3
22
2
20
28
39
9
27
3
21
30
37
3
24
3
23
29
41
28
4
26
29
45
4
28
28
...

output:

? 0000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000
? 1000100000010000001110001010100000100000001011000000001101100010001001010000000101000110101001010010
? 10001000000100000011100010111000001000000010110000000011011000100010010100000001010001101010...

result:

ok Correct answer with 293 queries.

Test #13:

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

input:

100
1
1
2
3
4
1
2
1
2
4
5
1
2
1
2
4
5
1
2
1
2
1
2
1
2
2
3
1
2
2
3
4
5
1
2
4
5
3
4
2
3
2
3
4
5
3
4
1
2
2
2
34
34
3
3
6
4
4
1
3
2
4
2
4
3
4
6
1
3
1
3
4
6
6
2
3
31
31
1
4
3
6
2
5
2
4
38
39
1
5
1
5
1
5
8
5
1
5
8
2
6
2
6
8
6
8
5
5
1
5
6
1
3
26
28
1
4
5
2
5
1
4
1
4
1
4
2
5
5
8
2
5
2
5
5
2
5
6
4
3
6
1
4
5
...

output:

? 0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000
? 0000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00001000000000000000000000000000000000000000000000000000000000100000000000000000000000000000...

result:

ok Correct answer with 523 queries.

Test #14:

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

input:

100
3
27
29
1
4
1
4
1
4
2
5
1
4
4
7
1
4
1
4
1
4
1
4
1
4
2
5
2
4
28
32
26
26
12
16
7
10
1
5
1
5
1
4
25
29
22
26
19
18
6
10
5
6
2
3
28
28
1
4
1
4
1
4
2
5
1
4
3
6
1
4
1
4
4
1
4
1
4
5
1
4
2
5
3
3
34
35
4
3
6
4
1
4
4
1
4
4
4
2
5
2
5
1
4
4
3
6
2
5
1
4
1
4
2
5
6
1
2
38
38
1
3
1
3
1
3
2
4
1
3
4
1
3
2
4
2
4
...

output:

? 0000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0011000110100010000000001100001100110000010001011100000000010010010100001011001110000000101110010100
? 00110101101000100000000011000011001100000100010111000000000100100101000010110011100000001011...

result:

ok Correct answer with 196 queries.

Test #15:

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

input:

150
4
65
64
38
42
26
29
2
6
4
8
2
6
4
8
2
5
58
60
4
8
55
55
28
32
10
18
5
12
2
10
10
50
54
23
30
3
10
56
59
24
30
9
19
6
14
2
12
12
52
55
18
28
3
15
3
15
2
14
3
15
4
14
47
55
21
30
13
25
7
20
44
53
16
33
3
23
3
23
4
21
40
52
18
34
10
27
24
24
44
51
3
24
36
46
7
31
1
24
33
47
7
27
1
25
2
23
33
48
10
...

output:

? 000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0100110101011000010101010100010000010100000100000001110001010010001100000010000001001000000000110110001010010001001000100010010011000110000010000...

result:

ok Correct answer with 480 queries.

Test #16:

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

input:

150
2
62
63
4
6
2
4
3
5
1
3
2
4
2
4
2
4
2
4
2
4
2
4
1
2
67
66
5
7
7
9
3
5
4
6
4
6
2
4
2
4
4
6
2
4
1
3
1
3
4
4
1
3
1
3
3
5
3
5
8
9
52
56
19
27
10
1
10
1
10
2
11
2
11
1
10
10
51
58
15
12
5
15
2
12
1
11
3
13
1
11
13
3
13
2
12
4
12
53
54
21
27
7
18
4
15
47
52
13
27
1
16
2
17
3
17
45
50
19
31
9
25
4
20
3...

output:

? 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000
? 0101000000000000100001001000001000111010011110001000100111100100110011010110101111011001010010111110000000100000010100010101000100001011010110001...

result:

ok Correct answer with 481 queries.

Test #17:

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

input:

150
2
57
57
1
3
4
6
4
6
2
4
5
7
4
6
1
3
1
3
2
4
1
3
4
6
3
5
2
4
3
5
4
6
2
4
4
6
1
3
3
5
1
3
3
5
5
7
3
5
2
4
4
6
3
5
3
5
5
7
2
4
5
7
2
4
1
3
1
3
1
2
60
61
4
6
3
1
3
4
6
2
4
2
4
3
3
5
3
5
4
2
4
6
3
5
2
4
4
5
50
53
6
2
7
5
9
39
42
23
29
2
10
54
53
24
31
12
13
14
2
10
54
53
19
28
13
1
11
13
3
13
4
14
2
...

output:

? 000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 1010111011011011001000001011011000000010000001001100100010100010100001011110000010010010010011110001111001001100010111101000101010000010000000010...

result:

ok Correct answer with 602 queries.

Test #18:

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

input:

150
2
66
66
3
5
2
4
4
6
5
7
6
8
7
9
3
5
3
5
1
3
3
5
2
4
3
5
3
5
1
3
4
6
4
6
3
5
5
7
1
3
3
5
4
6
1
1
3
4
2
3
2
2
3
3
4
1
2
1
2
1
2
4
5
4
5
6
5
6
3
4
1
2
5
1
2
2
3
7
8
4
6
3
4
2
3
1
2
4
2
3
5
4
5
5
6
2
3
3
2
3
3
4
2
3
3
3
61
62
5
8
1
4
8
7
8
11
3
6
4
6
70
69
38
38
16
21
13
3
9
3
9
8
55
55
28
31
10
15
...

output:

? 000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 1000011010110001001000011001101000001001001010100111001010101000011010010000000111001010001000100000100010010011000010100100000111001010110111111...

result:

ok Correct answer with 573 queries.

Test #19:

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

input:

150
1
1
2
2
3
2
3
2
3
1
2
2
3
2
3
3
4
1
2
2
3
3
4
3
4
1
2
3
3
47
49
2
5
2
5
3
6
4
2
5
1
4
2
5
1
4
1
4
4
7
1
4
5
1
4
2
5
2
5
2
5
2
5
2
5
2
5
1
4
2
5
2
5
1
4
2
5
3
6
1
4
1
4
1
4
4
7
1
3
43
44
3
6
5
8
4
1
4
3
6
1
4
1
4
2
5
6
4
7
4
2
5
3
6
6
5
8
1
4
6
5
8
5
5
2
5
2
5
4
2
5
3
6
2
5
2
5
3
6
1
4
1
4
1
4
2
...

output:

? 000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 322 queries.

Test #20:

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

input:

200
1
1
2
1
2
1
2
1
2
3
4
1
2
4
5
2
3
1
2
1
2
1
0

output:

? 00000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 23 queries.

Test #21:

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

input:

200
1
1
2
2
3
2
3
3
4
2
3
2
3
2
3
4
5
1
2
1
2
2
3
3
3
73
73
3
6
4
7
1
4
2
5
3
6
1
4
1
4
4
7
1
4
2
5
3
6
5
2
5
3
6
1
4
1
4
2
5
3
6
2
5
5
1
4
1
2
61
63
57
58
2
4
4
3
5
2
4
2
4
2
4
2
4
4
6
5
7
3
5
3
5
2
4
1
3
1
3
2
4
1
3
1
3
6
4
2
4
1
3
2
4
1
3
2
4
1
3
1
3
3
5
2
4
2
4
2
4
1
3
2
3
72
70
46
46
2
5
4
6
2
...

output:

? 00000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 644 queries.

Test #22:

score: 0
Accepted
time: 49ms
memory: 15968kb

input:

200
1
1
2
2
3
3
4
1
2
4
5
1
2
2
3
1
2
1
2
3
4
2
3
3
4
4
4
60
60
34
38
20
21
1
5
2
4
58
59
5
2
6
2
6
2
6
5
1
5
5
9
3
7
7
1
5
3
7
2
6
1
5
1
5
2
6
2
6
3
7
1
5
2
6
2
6
3
7
2
6
1
5
2
6
7
1
5
1
5
2
4
74
75
1
5
5
8
57
60
29
37
19
25
2
10
9
3
11
1
9
9
3
11
1
9
3
11
4
10
47
54
2
12
1
11
13
3
13
3
13
1
11
11
...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 1691 queries.

Test #23:

score: 0
Accepted
time: 60ms
memory: 15768kb

input:

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

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000
? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 1746 queries.

Test #24:

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

input:

200
5
80
83
3
8
2
7
4
9
3
8
1
6
3
8
3
8
1
6
3
8
1
6
3
8
1
6
3
8
2
7
1
6
2
7
3
8
2
7
4
9
2
7
2
7
3
8
2
7
3
6
79
82
3
9
9
9
4
10
1
7
3
9
4
10
2
8
4
10
5
11
2
6
77
79
46
48
21
24
3
9
3
9
4
10
3
9
9
1
6
80
86
69
71
35
39
4
9
74
74
37
43
2
11
4
13
4
12
64
67
25
36
13
13
65
70
26
38
1
14
3
16
6
19
4
16
61...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000
? 00100000011001001010010010000110000101011000110000010001100000000110001010101001000000100001100...

result:

ok Correct answer with 664 queries.

Test #25:

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

input:

200
7
101
100
47
49
18
21
7
12
3
8
104
105
58
60
19
25
2
10
2
9
95
99
49
56
2
10
98
96
41
48
3
13
2
12
3
12
87
87
33
42
3
15
3
14
81
88
45
53
14
27
1
15
5
19
6
20
17
88
87
21
37
9
26
2
18
72
83
40
54
15
29
5
23
5
21
71
79
20
41
19
36
4
24
66
76
18
34
6
28
59
69
14
37
6
32
58
74
12
41
1
33
2
34
4
36
...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01001001010001000010010000000001001000000000000000100110001000000001010000000010000110000000010...

result:

ok Correct answer with 517 queries.

Test #26:

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

input:

200
3
103
104
1
4
4
7
3
6
2
5
3
6
3
6
4
7
3
6
2
5
1
4
6
9
3
6
4
7
4
7
2
5
5
8
7
10
5
8
3
6
9
12
4
7
3
6
3
6
5
8
9
12
7
10
5
8
6
9
3
6
5
8
4
7
3
6
5
8
7
10
7
10
7
10
7
10
4
7
5
8
4
7
2
5
3
6
6
9
4
7
5
8
3
6
4
7
9
11
94
99
37
46
14
5
16
3
14
13
18
6
17
6
17
2
13
5
16
2
11
100
102
43
48
14
23
13
92
95
...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010
? 01100010000010010011000010001000001001000011010000011100100100100011101000101001001011001100000...

result:

ok Correct answer with 576 queries.

Test #27:

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

input:

200
4
95
95
55
57
3
7
7
11
2
6
6
10
2
6
1
5
2
5
94
97
4
9
2
7
3
8
6
11
5
10
2
7
8
13
6
9
86
89
43
51
6
15
1
10
3
12
4
13
2
11
6
15
4
13
6
15
1
10
3
12
6
15
7
15
78
81
30
42
3
18
5
19
72
79
22
37
11
29
4
23
1
19
69
78
22
39
6
25
1
20
3
22
20
70
81
25
42
3
23
2
22
6
26
2
22
2
22
4
21
58
66
21
35
6
25
...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000
? 10100000010101100111000110100010010101101011000100000100000000010000001001100001100100110101000...

result:

ok Correct answer with 587 queries.

Test #28:

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

input:

200
6
101
101
53
57
6
12
3
9
5
11
1
7
4
10
2
8
7
12
87
91
36
44
18
27
4
15
92
96
38
48
15
28
5
20
3
18
20
83
93
32
47
20
35
7
27
5
23
71
82
30
48
13
34
9
30
50
70
21
47
7
35
4
33
55
75
14
42
5
37
56
80
23
57
9
45
48
78
4
46
50
72
8
50
52
86
5
54
51
80
6
56
38
77
5
59
43
81
3
60
42
85
3
62
38
70
3
62...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000
? 11001111000110100101000000100100000001010000100000000000000100000000001010100100000001111010110...

result:

ok Correct answer with 514 queries.

Test #29:

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

input:

200
4
117
116
83
84
5
9
6
10
7
11
3
7
6
10
5
9
3
7
3
7
4
8
5
9
6
8
94
96
56
61
8
15
73
79
33
45
3
17
81
87
25
39
3
19
74
81
35
45
8
24
72
81
29
45
4
27
70
85
22
49
14
40
4
31
3
29
60
75
11
36
2
31
2
30
59
70
16
38
6
35
60
81
14
46
1
36
9
43
58
84
10
51
44
83
2
53
3
54
6
55
46
87
7
61
44
82
8
68
33
8...

output:

? 00000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00110010010010000000110010100011100000101000001101000000001111100001110000010000000101110101000...

result:

ok Correct answer with 487 queries.

Test #30:

score: 0
Accepted
time: 66ms
memory: 16192kb

input:

200
2
71
72
3
5
1
3
3
5
2
4
1
3
2
4
4
6
2
4
1
3
3
5
1
3
3
5
3
5
2
4
3
5
2
4
1
3
2
4
2
4
1
3
4
6
1
3
3
5
2
4
1
3
1
3
2
4
3
5
1
3
1
3
2
4
3
5
2
4
2
4
2
4
1
3
1
3
2
4
1
3
3
5
2
4
3
5
3
5
1
3
2
4
2
4
2
4
1
3
1
3
4
6
1
2
75
77
68
68
3
2
4
3
5
2
4
5
1
3
1
3
5
1
3
1
3
1
3
1
3
2
4
3
2
2
71
72
4
6
3
5
3
4
2
...

output:

? 00000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000010010001000000110011111010001110010110111100001100000000000000111110001010101110100110000...

result:

ok Correct answer with 1929 queries.

Test #31:

score: 0
Accepted
time: 65ms
memory: 15308kb

input:

200
2
80
79
2
4
2
4
2
4
3
5
1
3
1
3
3
5
2
4
3
5
1
3
3
5
2
4
1
3
3
5
1
3
2
4
3
5
2
4
3
5
2
4
3
5
2
4
2
4
3
5
2
4
2
2
78
77
1
3
4
3
5
2
4
4
6
2
4
2
4
2
4
4
6
3
5
2
4
1
3
3
5
1
3
2
4
5
1
3
1
3
4
6
4
4
3
5
5
4
6
2
4
2
4
1
3
1
3
2
4
2
4
2
4
3
5
1
3
3
5
3
5
1
3
2
4
2
4
2
4
2
4
3
4
61
65
55
52
29
33
13
17
...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000
? 00010101000000111110011100100000100011001010110000010101001001011110000110001001000010010100011...

result:

ok Correct answer with 1546 queries.

Test #32:

score: 0
Accepted
time: 56ms
memory: 15452kb

input:

200
2
64
66
66
65
2
4
3
5
1
3
3
5
4
5
73
74
34
36
3
8
2
7
3
8
1
6
3
8
2
7
1
6
1
4
66
66
36
39
1
5
2
6
2
6
1
5
3
6
60
62
33
39
24
27
1
7
3
9
2
5
70
72
1
6
1
6
4
9
1
6
2
7
3
8
1
6
1
6
2
7
6
1
6
3
8
3
7
69
67
23
30
23
27
2
9
4
11
3
10
1
8
1
8
10
9
3
10
1
8
8
53
58
1
9
2
10
4
12
2
10
2
8
53
52
23
31
13
...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00110101000010100010011010011001101000001111111101100010110101010100000000010100001010110101000...

result:

ok Correct answer with 1532 queries.

Test #33:

score: 0
Accepted
time: 49ms
memory: 13760kb

input:

200
3
73
74
3
6
2
4
65
64
37
41
27
29
3
7
3
7
2
6
2
4
62
61
35
35
13
15
1
3
65
64
41
42
3
6
2
5
2
5
1
4
4
7
2
5
1
4
1
4
2
5
2
5
2
5
1
4
2
5
3
6
2
5
1
4
1
4
2
5
4
7
1
4
3
6
1
4
3
6
2
5
1
2
74
74
1
3
1
3
5
7
5
7
4
5
67
69
9
8
1
6
1
6
1
6
1
6
6
1
6
3
8
2
7
3
8
3
8
2
7
1
6
2
7
2
7
2
7
2
7
6
2
7
1
6
4
9
...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00100111101110010000100000000100000011011001100000100001010100100101000010100001000000000111011...

result:

ok Correct answer with 1189 queries.

Test #34:

score: 0
Accepted
time: 51ms
memory: 15392kb

input:

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

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 1776 queries.

Test #35:

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

input:

200
2
80
81
1
3
1
3
3
5
2
4
3
5
2
4
3
5
2
4
2
4
3
5
3
5
3
5
3
5
3
5
2
4
2
4
2
4
2
4
3
5
2
4
3
5
2
4
3
5
2
4
2
4
2
4
3
5
2
4
3
5
3
4
78
80
2
6
2
6
3
7
6
2
6
3
7
2
6
2
6
3
7
7
2
6
3
7
3
7
2
6
3
7
3
7
3
5
71
70
39
41
7
2
7
2
7
3
8
2
7
2
7
3
8
3
5
71
70
31
33
2
7
7
67
70
35
42
20
25
2
9
2
7
67
68
30
33
...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000
? 00111111101000000010010000000011100011001110111010001100101000011110000010010010100010011011001...

result:

ok Correct answer with 614 queries.

Test #36:

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

input:

200
3
73
72
45
46
3
6
3
6
2
5
2
5
2
5
2
5
2
5
3
4
79
80
2
6
2
6
2
6
2
6
2
6
2
6
2
6
3
7
2
6
3
7
6
3
7
3
7
2
6
6
3
7
2
6
2
6
3
7
2
6
3
7
2
6
3
7
2
6
3
7
2
6
2
6
2
6
3
7
2
6
2
6
1
5
3
7
2
6
3
7
2
6
2
5
82
83
43
47
2
7
1
6
3
8
3
8
3
8
8
2
7
3
8
2
7
3
8
7
3
7
70
74
2
9
2
9
2
9
9
10
1
8
9
2
9
1
8
10
2
9
...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000001010011111000000010010000011100001001001110000010010101011000100000010100101010000000...

result:

ok Correct answer with 877 queries.

Test #37:

score: 0
Accepted
time: 69ms
memory: 20392kb

input:

200
2
74
73
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
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
2
76
77
2
4
2
4
2
4
4
2
4
2
4
2
4
2
4
4
2
4
2
4
4
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
4
2
4
2
4
2
4
2
4
4
2
4
2
4
2
4
2
4
2
4
2
4
4
2
4
2
4
2
...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000
? 11010001010011101110101001001011110011100100100001010100001011000110000010010000000000100001010...

result:

ok Correct answer with 2801 queries.

Test #38:

score: 0
Accepted
time: 71ms
memory: 17620kb

input:

200
2
78
79
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
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
3
72
73
2
5
2
5
2
5
2
5
5
2
5
2
5
5
2
5
2
...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000
? 00100111000011000100000111010100010011110010100101000011101111111100000100100101001011110010001...

result:

ok Correct answer with 2508 queries.

Test #39:

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

input:

200
3
75
74
43
44
3
6
3
6
2
5
1
4
1
4
1
4
1
3
62
61
36
36
3
6
4
4
64
64
35
39
25
27
4
8
2
6
2
6
1
5
1
3
71
70
36
38
3
6
1
3
71
73
2
5
1
4
1
4
2
5
1
4
2
5
3
6
3
6
6
1
4
5
8
1
4
3
6
2
5
1
4
1
4
1
3
71
72
3
6
2
5
1
4
3
6
2
5
3
6
2
5
1
4
2
5
6
4
7
2
5
2
5
2
5
2
5
2
5
2
5
1
4
2
5
2
5
3
6
2
5
1
4
1
4
5
2
...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000
? 00100001100011000000001001001001101000000010111110000100011100011100010110001000000001000010001...

result:

ok Correct answer with 1039 queries.

Test #40:

score: 0
Accepted
time: 55ms
memory: 15052kb

input:

200
3
74
77
57
58
1
4
3
6
2
5
1
4
3
6
1
4
1
4
1
4
1
4
5
8
2
5
2
4
67
66
35
35
21
24
1
5
3
7
1
5
3
7
3
7
2
6
2
5
65
68
2
7
3
6
63
66
4
7
63
66
32
36
3
10
3
10
2
9
1
8
8
1
7
61
65
2
9
2
9
10
1
8
1
8
2
9
3
10
1
8
3
10
2
9
1
8
9
8
3
10
8
1
8
3
10
1
8
1
8
8
3
10
2
9
2
9
2
9
2
9
1
8
2
9
1
8
1
6
66
66
30
3...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 11000001001000011011000000000000001011111000010001000011010010000010000000000000110001010001001...

result:

ok Correct answer with 1424 queries.

Test #41:

score: 0
Accepted
time: 64ms
memory: 16228kb

input:

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

output:

? 00000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000...

result:

ok Correct answer with 1807 queries.

Test #42:

score: 0
Accepted
time: 53ms
memory: 15544kb

input:

200
3
62
63
2
5
1
4
2
5
2
5
2
5
1
4
1
4
1
4
1
4
2
5
2
5
2
5
2
5
2
5
2
5
1
4
1
4
1
4
4
7
2
5
2
5
4
7
1
4
1
4
1
4
1
4
2
5
4
7
1
4
3
6
2
5
2
5
2
5
2
5
3
6
1
4
2
5
1
4
2
5
2
5
2
5
2
5
1
4
2
5
3
6
1
4
2
5
4
7
1
4
3
6
3
6
2
5
4
7
5
8
2
3
68
67
45
48
29
30
5
8
2
5
1
4
1
4
1
4
3
6
3
6
4
3
6
2
5
2
5
2
5
1
4
...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000
? 00010000001000011100011001000000010100100000010011000000110100100110010010101001110110011010101...

result:

ok Correct answer with 1747 queries.

Test #43:

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

input:

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

output:

? 00000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 752 queries.

Test #44:

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

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:

? 00000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 397 queries.

Test #45:

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

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:

? 00000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 403 queries.

Test #46:

score: 0
Accepted
time: 53ms
memory: 14336kb

input:

200
1
1
2
1
2
1
2
1
2
16
15
31
41
11
23
1
16
1
16
1
16
1
16
1
14
27
38
1
14
65
76
1
15
1
15
1
15
1
14
34
44
10
20
4
18
3
16
1
14
12
22
8
22
5
17
1
15
1
15
1
15
1
15
1
15
1
15
1
13
21
28
19
30
1
14
14
1
14
14
27
1
14
1
12
32
43
1
13
1
13
1
13
1
13
1
13
1
13
13
1
13
13
13
1
13
13
1
13
1
13
1
13
1
13
1...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000
? 00000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000...

result:

ok Correct answer with 1306 queries.

Test #47:

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

input:

200
1
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
16
17
1
1
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
2
1
2
1
1
1
2
1
1
16
17
1
2
1
2
1
2
1
2
1
2
1
2
2
1
2
2
1
2
20
21
1
2
2
1
2
1
2
1
2
1
2
1
2
1
2
2
1
1
1
2
2
1
2
1
2
1
2
1
1
1
2
2
2
1
2
1
2
1
2
2
19
20
1
2
2
1
2
2
1
2
2
1
2
2
1
2
1
2
1
2
1
2
1
2
2
1
2
1
...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000...

result:

ok Correct answer with 1173 queries.

Test #48:

score: 0
Accepted
time: 92ms
memory: 21000kb

input:

200
2
82
81
2
4
2
4
2
4
2
4
2
4
2
4
2
4
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
78
79
2
4
2
4
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
4
2
4
2
4
2
4
2
4
4
2
4
2
4
4
...

output:

? 00000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01110111111101001000100101010100000010101000010101010001101010000010000110011100000000110000110...

result:

ok Correct answer with 3067 queries.

Test #49:

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

input:

200
2
68
68
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
2
83
81
54
55
2
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
2
4
2
3
69
69
2
5
2
5
5
2
5
2
5
2
5
2
5
2
5
2
5
5
2
5
2
5
2
5
2
5
2
5
5
2
5
2
5
2
5
5
2
5
2
5
2
5
2
5
2
5
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
2
5
...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000
? 01111000011001010000111010011010101110101000111100111001110010010001101000011010010010101001000...

result:

ok Correct answer with 2681 queries.

Test #50:

score: 0
Accepted
time: 109ms
memory: 23040kb

input:

200
2
73
73
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
2
73
72
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
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
74
74
2
4
2
4
2
4
4
2
4
4
2
4
4
2
4
2
4
2
4
4
2
4
4
2
4
2
4
2
4
2
4
4
4
2
4
2
4
2
4
2
4
2
4
2
4
4
...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000
? 10011000001110010000101110000011000110100100101010100001101000000010010001110001101000000101100...

result:

ok Correct answer with 3100 queries.

Test #51:

score: -100
Dangerous Syscalls

input:

200
2
78
77
2
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
78
78
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
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
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
4
2
4
2
4
2
4
2
4
2
4
2
4
2
4
...

output:

? 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000
? 01000001110000000011100110010110011010000000100011100111000000010111001010010000001000111111001...

result: