QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#863638#9783. Duloc Networkucup-team2401#TL 6ms3712kbC++233.4kb2025-01-19 20:34:012025-01-19 20:34:01

詳細信息

Test #1:

score: 100
Accepted
time: 0ms
memory: 3584kb

input:

4
1
1
1
3
2
1
1
1
1
2
2
1
2
2

output:

? 1000
? 0111
? 1000
? 0100
? 1100
? 1000
? 0011
? 1011
? 1000
? 0010
? 1010
? 1000
? 0001
? 1001
! 1

result:

ok Correct answer with 14 queries.

Test #2:

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

input:

2
0
0

output:

? 10
? 01
! 0

result:

ok Correct answer with 2 queries.

Test #3:

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

input:

4
1
1
1
3
2
1
1
1
1
2
2
1
2
2

output:

? 1000
? 0111
? 1000
? 0100
? 1100
? 1000
? 0011
? 1011
? 1000
? 0010
? 1010
? 1000
? 0001
? 1001
! 1

result:

ok Correct answer with 14 queries.

Test #4:

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

input:

2
0
0

output:

? 10
? 01
! 0

result:

ok Correct answer with 2 queries.

Test #5:

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

input:

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

output:

? 10000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111
? 10000000000000000000000000000000000000000000000000
? 01111111111111111111111110000000000000000000000000
? 11111111111111111111111110000000000000000000000000
? 100000000000000000000000000000000...

result:

ok Correct answer with 546 queries.

Test #6:

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

input:

50
10
1
10
26
25
10
36
36
10
32
33
10
20
22
10
13
19
10
12
16
10
8
14
10
6
13
10
23
29
10
13
22
10
16
22
10
8
17
10
10
17
10
36
37
10
18
26
10
8
17
10
13
22
10
8
18
10
8
17
10
29
31
10
9
17
10
23
26
10
13
18
10
15
22
10
38
37
10
36
36
10
24
28
10
11
18
10
17
23
10
9
18
10
10
16
10
27
30
10
14
20
10
...

output:

? 10000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111
? 10000000000000000000000000000000000000000000000000
? 01111111111111111111111110000000000000000000000000
? 11111111111111111111111110000000000000000000000000
? 100000000000000000000000000000000...

result:

ok Correct answer with 304 queries.

Test #7:

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

input:

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

output:

? 10000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111
? 10000000000000000000000000000000000000000000000000
? 01111111111111111111111110000000000000000000000000
? 11111111111111111111111110000000000000000000000000
? 100000000000000000000000000000000...

result:

ok Correct answer with 466 queries.

Test #8:

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

input:

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

output:

? 10000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111
? 10000000000000000000000000000000000000000000000000
? 01111111111111111111111110000000000000000000000000
? 11111111111111111111111110000000000000000000000000
? 100000000000000000000000000000000...

result:

ok Correct answer with 376 queries.

Test #9:

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

input:

50
3
1
3
16
15
3
13
13
3
6
6
3
3
4
3
1
4
3
2
3
3
1
4
3
1
2
3
4
5
3
2
3
3
2
5
3
8
11
3
10
11
3
6
7
3
3
6
3
5
6
3
3
6
3
2
3
3
1
4
3
1
2
3
7
10
3
16
18
3
11
13
3
7
9
3
3
5
3
1
4
3
2
4
3
1
3
3
1
4
3
4
7
3
8
11
3
15
18
0
0

output:

? 10000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111
? 10000000000000000000000000000000000000000000000000
? 01111111111111111111111110000000000000000000000000
? 11111111111111111111111110000000000000000000000000
? 100000000000000000000000000000000...

result:

ok Correct answer with 100 queries.

Test #10:

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

input:

100
1
1
1
29
30
1
31
30
1
26
25
1
14
13
1
10
11
1
7
6
1
4
5
1
3
2
1
1
2
1
2
1
1
1
0
1
1
2
1
19
20
1
35
36
0
0

output:

? 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 46 queries.

Test #11:

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

input:

100
11
1
11
50
49
11
65
65
11
60
61
11
46
48
11
27
33
11
13
23
11
18
24
11
9
17
11
11
19
11
26
32
11
8
18
11
20
27
11
7
18
11
15
22
11
39
45
11
26
32
11
12
20
11
16
24
11
8
17
11
8
18
11
22
32
11
7
17
11
15
26
11
61
63
11
42
48
11
28
36
11
12
22
11
20
29
11
11
22
11
9
18
11
27
34
11
10
18
11
18
28
1...

output:

? 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 748 queries.

Test #12:

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

input:

100
5
1
5
36
36
5
47
47
5
29
32
5
16
19
5
10
14
5
3
8
5
7
11
5
3
8
5
4
8
5
6
10
5
2
7
5
4
8
5
2
7
5
2
6
5
22
27
5
34
36
5
19
21
5
9
14
5
11
13
5
6
11
5
6
8
5
5
7
5
1
6
5
17
22
5
42
44
5
31
33
5
16
20
5
8
13
5
10
14
5
3
8
5
7
11
5
4
9
5
4
8
5
19
22
5
9
13
5
4
8
5
5
10
5
11
15
5
3
7
5
8
13
5
29
34
5
4...

output:

? 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 878 queries.

Test #13:

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

input:

100
1
1
1
34
33
1
37
38
1
29
28
1
14
14
1
7
8
1
10
10
1
5
5
1
1
2
1
4
4
1
3
3
1
1
2
1
5
6
1
20
19
1
9
8
1
3
4
1
7
6
1
4
3
1
3
4
1
12
13
1
31
31
1
29
29
1
16
17
1
19
19
1
7
7
1
3
4
1
6
6
1
2
2
1
4
5
1
13
14
1
32
32
1
12
12
1
6
6
1
3
4
1
7
7
1
5
5
1
3
4
1
9
10
1
22
23
7
3
7
33
34
7
38
39
7
19
22
7
7
1...

output:

? 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 918 queries.

Test #14:

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

input:

100
1
1
1
30
31
1
30
29
1
26
25
1
14
13
1
9
8
1
3
4
1
9
8
1
5
6
1
4
3
1
3
4
1
1
0
1
6
7
1
15
16
1
25
26
0
0

output:

? 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 46 queries.

Test #15:

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

input:

150
4
1
4
58
59
4
57
58
4
39
41
4
22
26
4
24
26
4
12
15
4
6
10
4
6
9
4
2
5
4
4
8
4
14
17
4
7
11
4
8
11
4
3
7
4
5
8
4
2
6
4
3
6
4
43
45
4
20
23
4
11
15
4
13
16
4
9
12
4
3
7
4
6
9
4
6
10
4
31
34
4
19
22
4
9
13
4
10
13
4
5
8
4
5
9
4
12
16
4
55
58
4
28
32
4
36
39
4
21
25
4
25
28
4
10
14
4
15
18
4
7
10
4...

output:

? 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 1448 queries.

Test #16:

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

input:

150
4
1
4
53
53
4
51
52
4
31
34
4
20
23
4
7
11
4
13
16
4
2
6
4
11
14
4
8
11
4
3
7
4
17
21
4
34
36
4
23
25
4
9
12
4
7
11
4
2
5
4
1
4
4
1
5
4
17
20
4
9
12
4
4
8
4
5
8
4
8
12
4
24
28
4
58
59
4
39
42
4
25
29
4
20
23
4
11
15
4
13
16
4
5
9
4
8
11
4
3
7
4
5
8
4
2
6
4
4
7
4
43
45
4
15
19
4
33
35
4
17
21
4
1...

output:

? 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 1534 queries.

Test #17:

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

input:

150
3
1
3
63
62
3
54
56
3
33
36
3
38
40
3
20
22
3
10
12
3
6
8
3
3
5
3
4
6
3
4
7
3
13
15
3
6
9
3
7
9
3
5
7
3
3
6
3
25
28
3
56
55
3
35
35
3
19
22
3
18
18
3
6
7
3
3
4
3
2
3
3
1
4
3
3
6
3
12
14
3
4
7
3
8
10
3
5
7
3
3
6
3
38
40
3
22
24
3
12
14
3
7
9
3
2
5
3
5
7
3
7
10
3
12
15
3
19
22
3
56
55
3
54
54
3
33...

output:

? 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 1548 queries.

Test #18:

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

input:

150
4
1
4
65
65
4
61
64
4
40
43
4
25
29
4
18
21
4
8
11
4
4
8
4
4
7
4
3
6
4
1
5
4
11
15
4
40
44
4
67
67
4
39
40
4
22
23
4
11
13
4
6
8
4
1
5
4
5
7
4
5
9
4
14
16
4
8
10
4
4
6
4
4
8
4
8
11
4
3
7
4
5
8
4
2
6
4
3
6
4
24
28
4
46
48
4
32
34
4
16
20
4
19
21
4
6
9
4
3
7
4
3
6
4
13
16
4
5
9
4
8
11
4
3
7
4
5
8
...

output:

? 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 1444 queries.

Test #19:

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

input:

150
2
1
2
51
50
2
42
43
2
22
23
2
12
14
2
15
16
2
6
8
2
9
10
2
3
5
2
6
7
2
1
2
2
5
7
2
32
33
2
21
23
2
14
15
2
7
8
2
3
5
2
6
7
2
2
4
2
4
5
2
2
4
2
2
3
2
7
9
2
53
52
2
31
31
2
17
17
2
8
10
2
9
9
2
5
7
2
4
4
2
1
3
2
3
3
2
1
3
2
2
2
2
15
17
2
35
35
2
19
19
2
6
8
2
13
13
2
7
7
2
2
4
2
5
5
2
6
8
2
20
22
...

output:

? 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 2248 queries.

Test #20:

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

input:

200
1
1
1
63
63
1
50
50
1
31
32
1
31
31
1
16
17
1
20
20
1
9
10
1
12
12
1
6
6
1
1
2
1
5
5
1
4
4
1
1
2
1
6
7
1
58
58
1
30
30
1
15
15
1
7
8
1
8
8
1
3
4
1
5
5
1
2
3
1
3
3
1
1
2
1
2
2
1
17
18
1
39
40
1
65
64
1
56
57
1
57
56
1
31
32
1
29
28
1
15
16
1
15
14
1
8
9
1
8
7
1
5
4
1
3
2
1
2
3
1
5
6
4
2
4
62
62
4...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 1396 queries.

Test #21:

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

input:

200
3
1
3
67
67
3
60
60
3
38
41
3
39
39
3
19
19
3
11
13
3
7
10
3
4
6
3
1
4
3
3
5
3
2
5
3
1
3
3
9
10
3
4
5
3
1
4
3
3
4
3
2
3
3
1
4
3
6
9
3
23
26
3
60
63
3
67
66
3
58
60
3
35
37
3
21
24
3
16
18
3
9
12
3
9
11
3
7
9
3
1
4
3
6
8
3
4
6
3
2
5
3
4
7
3
40
43
3
64
64
3
46
46
3
28
28
3
15
16
3
8
10
3
1
3
3
7
1...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 2992 queries.

Test #22:

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

input:

200
1
1
1
71
72
1
67
66
1
63
62
1
44
43
1
23
24
1
26
25
1
10
9
1
5
6
1
5
4
1
2
3
1
3
2
1
1
0
1
2
3
1
16
17
1
37
38
1
64
65
0
0

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 52 queries.

Test #23:

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

input:

200
1
1
1
69
68
1
64
63
1
36
35
1
20
21
1
21
20
1
11
10
1
7
6
1
2
3
1
5
4
1
3
2
1
2
3
1
4
5
1
11
12
1
49
50
1
61
62
1
75
75
1
63
63
1
39
39
1
19
20
1
22
22
1
12
13
1
10
10
1
5
5
1
2
3
1
3
3
1
2
3
1
1
1
1
7
8
1
46
46
1
22
23
1
30
30
1
15
15
1
9
9
1
3
4
1
6
6
1
4
4
1
2
3
1
6
7
1
15
16
1
65
66
3
1
3
67...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 3294 queries.

Test #24:

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

input:

200
1
1
1
74
74
1
74
75
1
70
70
1
53
53
1
30
31
1
30
30
1
13
13
1
6
7
1
7
7
1
3
4
1
4
4
1
3
3
1
2
3
1
20
21
1
44
44
1
17
18
1
35
35
1
18
19
1
18
18
1
10
10
1
3
4
1
7
7
1
3
4
1
4
4
1
8
9
1
80
79
1
83
84
1
74
73
1
48
47
1
27
26
1
17
17
1
10
11
1
8
8
1
3
4
1
5
5
1
2
3
1
3
3
1
15
14
1
5
6
1
10
9
1
5
4
1...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 2074 queries.

Test #25:

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

input:

200
6
1
6
83
82
6
96
98
6
79
81
6
41
46
6
22
27
6
16
21
6
6
11
6
10
16
6
7
13
6
22
28
6
58
60
6
30
32
6
15
18
6
5
10
6
10
14
6
3
9
6
7
11
6
15
20
6
5
10
6
10
16
6
30
36
6
82
86
6
52
57
6
23
29
6
37
42
6
12
18
6
25
30
6
5
11
6
20
25
6
10
15
6
10
16
6
46
51
6
20
25
6
9
15
6
11
16
6
2
8
6
9
14
6
3
9
6
...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 1734 queries.

Test #26:

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

input:

200
2
1
2
90
89
2
98
99
2
72
73
2
42
44
2
44
45
2
25
26
2
16
17
2
7
9
2
9
10
2
6
7
2
3
5
2
11
13
2
23
25
2
70
71
2
37
39
2
40
41
2
18
19
2
6
7
2
3
4
2
3
5
2
12
14
2
26
28
2
110
109
2
84
86
2
76
75
2
40
40
2
24
24
2
11
13
2
14
14
2
4
6
2
10
10
2
5
5
2
5
7
2
21
23
2
52
52
2
22
24
2
33
33
2
12
12
2
4
4...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 1924 queries.

Test #27:

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

input:

200
4
1
4
90
89
4
93
94
4
59
63
4
68
69
4
41
42
4
26
28
4
11
13
4
1
5
4
10
12
4
8
12
4
2
4
4
15
19
4
17
20
4
10
14
4
7
10
4
2
6
4
5
8
4
1
5
4
4
7
4
41
45
4
97
97
4
63
66
4
37
41
4
41
44
4
21
25
4
20
23
4
12
16
4
8
11
4
6
9
4
3
7
4
3
6
4
2
6
4
61
62
4
32
35
4
17
21
4
19
22
4
7
10
4
2
6
4
5
8
4
3
6
4
...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 1954 queries.

Test #28:

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

input:

200
6
1
6
90
91
6
106
108
6
77
80
6
51
56
6
28
33
6
11
17
6
18
23
6
8
13
6
10
16
6
29
34
6
11
16
6
6
12
6
5
10
6
3
8
6
2
8
6
19
25
6
47
51
6
29
35
6
23
27
6
13
19
6
12
16
6
4
10
6
8
12
6
3
9
6
5
9
6
77
80
6
41
45
6
22
26
6
11
16
6
6
11
6
5
11
6
12
17
6
3
9
6
9
14
6
4
9
6
5
11
6
20
26
6
48
53
6
25
30...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 1772 queries.

Test #29:

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

input:

200
7
1
7
94
93
7
90
90
7
75
79
7
42
47
7
20
25
7
13
18
7
4
11
7
9
14
7
6
13
7
3
8
7
9
16
7
23
30
7
54
59
7
22
28
7
14
21
7
8
14
7
4
11
7
4
10
7
4
10
7
3
9
7
37
43
7
17
24
7
20
26
7
3
10
7
17
23
7
7
13
7
10
17
7
60
62
7
39
42
7
22
25
7
16
20
7
5
9
7
11
18
7
9
14
7
5
10
7
4
11
7
19
26
7
39
45
7
19
25...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 1806 queries.

Test #30:

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

input:

200
2
1
2
67
68
2
61
62
2
32
34
2
44
45
2
25
26
2
11
12
2
7
8
2
1
3
2
6
7
2
3
5
2
3
4
2
4
6
2
14
16
2
28
29
2
13
14
2
4
5
2
2
4
2
2
3
2
1
2
2
1
3
2
9
11
2
15
17
2
52
54
2
66
65
2
58
57
2
36
37
2
20
22
2
21
22
2
10
12
2
12
13
2
5
6
2
3
5
2
2
3
2
1
2
2
1
3
2
7
9
2
46
46
2
20
22
2
27
27
2
16
18
2
12
12...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 3432 queries.

Test #31:

score: -100
Time Limit Exceeded

input:

200
1
1
1
73
74
1
71
70
1
54
53
1
41
42
1
41
40
1
26
26
1
11
11
1
6
6
1
1
2
1
5
5
1
3
4
1
2
2
1
5
6
1
15
16
1
25
24
1
13
12
1
6
7
1
7
6
1
3
4
1
4
3
1
2
1
1
2
3
1
13
14
1
61
62
1
1
1
74
73
1
54
54
1
34
34
1
19
20
1
21
21
1
13
14
1
10
10
1
5
5
1
1
2
1
4
4
1
2
3
1
2
2
1
5
6
1
37
38
1
61
60
1
40
39
1
21...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result: