QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#858796#9783. Duloc Networkucup-team3625WA 10ms3712kbC++202.2kb2025-01-16 22:48:162025-01-16 22:48:18

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

4
1
2
1
3
2
2
1
2
0

output:

? 1000
? 0110
? 1110
? 0100
? 1100
? 0010
? 1110
? 0001
? 1111
! 1

result:

ok Correct answer with 9 queries.

Test #2:

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

input:

2
0
0
0

output:

? 10
? 01
? 11
! 0

result:

ok Correct answer with 3 queries.

Test #3:

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

input:

4
1
2
1
3
2
2
1
2
0

output:

? 1000
? 0110
? 1110
? 0100
? 1100
? 0010
? 1110
? 0001
? 1111
! 1

result:

ok Correct answer with 9 queries.

Test #4:

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

input:

2
0
0
0

output:

? 10
? 01
? 11
! 0

result:

ok Correct answer with 3 queries.

Test #5:

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

input:

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

output:

? 10000000000000000000000000000000000000000000000000
? 01111111111111111111111111000000000000000000000000
? 11111111111111111111111111000000000000000000000000
? 01111111111111000000000000000000000000000000000000
? 11111111111111000000000000000000000000000000000000
? 011111110000000000000000000000000...

result:

ok Correct answer with 539 queries.

Test #6:

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

input:

50
10
25
24
36
35
33
34
29
30
19
21
13
19
26
24
37
35
31
34
23
30
12
22
8
21
26
23
37
34
32
35
22
32
18
30
6
22
27
23
36
33
30
35
23
33
18
32
13
30
27
22
36
32
32
34
20
34
16
33
8
32
28
22
37
32
36
35
21
35
15
34
10
33
28
21
36
31
36
36
18
35
16
35
8
34
29
21
37
31
34
35
20
34
13
35
8
35
29
20
37
30...

output:

? 10000000000000000000000000000000000000000000000000
? 01111111111111111111111111000000000000000000000000
? 11111111111111111111111111000000000000000000000000
? 01111111111111000000000000000000000000000000000000
? 11111111111111000000000000000000000000000000000000
? 011111110000000000000000000000000...

result:

ok Correct answer with 465 queries.

Test #7:

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

input:

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

output:

? 10000000000000000000000000000000000000000000000000
? 01111111111111111111111111000000000000000000000000
? 11111111111111111111111111000000000000000000000000
? 01111111111111000000000000000000000000000000000000
? 11111111111111000000000000000000000000000000000000
? 000000000000001111111111110000000...

result:

ok Correct answer with 487 queries.

Test #8:

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

input:

50
2
23
24
29
30
32
33
26
27
20
21
14
15
24
24
29
30
30
33
21
27
14
24
8
21
25
23
31
31
29
33
23
30
15
27
8
24
26
23
33
31
30
33
24
33
18
30
7
27
27
22
34
31
31
32
25
33
22
33
12
30
28
22
35
31
29
32
20
33
17
33
12
33
28
21
34
31
28
31
20
33
14
33
8
33
28
21
34
31
31
30
21
32
15
33
8
33
28
20
34
30
...

output:

? 10000000000000000000000000000000000000000000000000
? 01111111111111111111111111000000000000000000000000
? 11111111111111111111111111000000000000000000000000
? 01111111111111000000000000000000000000000000000000
? 11111111111111000000000000000000000000000000000000
? 011111110000000000000000000000000...

result:

ok Correct answer with 465 queries.

Test #9:

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

input:

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

output:

? 10000000000000000000000000000000000000000000000000
? 01111111111111111111111111000000000000000000000000
? 11111111111111111111111111000000000000000000000000
? 01111111111111000000000000000000000000000000000000
? 11111111111111000000000000000000000000000000000000
? 011111110000000000000000000000000...

result:

ok Correct answer with 63 queries.

Test #10:

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

input:

100
1
28
29
30
29
35
36
25
24
13
12
10
11
7
6
3
2
2
3
1
0
29
29
30
30

output:

? 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0111111111111111111111111111111111111111111111111110000000000000000000000000000000000000000000000000
? 11111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000...

result:

ok Correct answer with 25 queries.

Test #11:

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

input:

100
11
49
48
65
64
62
63
49
50
35
40
19
27
13
23
50
48
65
64
61
64
49
53
31
43
18
33
9
27
50
47
67
65
62
63
51
55
37
48
19
40
11
33
51
47
68
65
57
63
43
55
26
48
14
43
8
40
51
46
68
65
58
62
41
57
30
50
20
48
7
43
52
46
71
66
59
64
41
58
30
53
25
50
15
48
52
45
69
65
58
66
39
61
26
55
20
53
12
50
53...

output:

? 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0111111111111111111111111111111111111111111111111110000000000000000000000000000000000000000000000000
? 11111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000...

result:

ok Correct answer with 1135 queries.

Test #12:

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

input:

100
5
36
36
46
46
29
32
21
24
12
16
6
11
6
10
2
7
4
8
37
36
44
46
29
34
22
28
10
18
14
20
12
19
4
12
8
15
39
37
43
46
27
36
17
29
10
23
6
21
4
17
2
17
2
15
39
37
42
46
26
36
15
29
8
23
11
25
9
24
2
16
37
36
40
46
25
37
16
30
8
24
12
26
9
23
4
18
38
36
38
45
26
38
14
31
8
26
12
29
8
26
4
21
38
35
38
...

output:

? 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0111111111111111111111111111111111111111111111111110000000000000000000000000000000000000000000000000
? 11111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000...

result:

ok Correct answer with 1177 queries.

Test #13:

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

input:

100
1
34
33
38
39
29
28
19
18
14
15
9
8
6
5
2
3
4
3
33
33
38
39
22
24
11
13
6
9
5
7
4
6
1
4
3
5
32
32
38
40
22
25
12
15
6
11
6
9
5
8
4
7
32
32
36
40
18
25
24
28
14
19
5
10
4
11
1
6
33
33
34
39
18
24
22
27
12
18
11
16
7
13
5
10
3
9
3
8
33
33
34
39
18
24
8
16
12
18
6
12
2
8
1
9
1
7
32
32
32
38
19
26
1...

output:

? 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0111111111111111111111111111111111111111111111111110000000000000000000000000000000000000000000000000
? 11111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000...

result:

ok Correct answer with 777 queries.

Test #14:

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

input:

100
1
29
30
29
28
25
26
25
24
15
14
9
8
6
7
5
4
2
1
1
2
1
0
30
30
29
29

output:

? 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0111111111111111111111111111111111111111111111111110000000000000000000000000000000000000000000000000
? 11111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000...

result:

ok Correct answer with 27 queries.

Test #15:

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

input:

150
4
58
58
56
57
44
46
24
28
27
29
14
17
10
13
8
11
5
9
3
6
58
58
56
57
45
47
24
27
12
16
7
13
5
9
3
9
2
6
59
58
56
58
45
48
25
29
12
18
15
19
9
13
6
10
2
8
4
8
57
58
53
57
45
51
22
28
12
20
12
18
7
14
4
11
2
9
58
58
58
61
46
52
25
31
12
21
15
21
9
18
7
13
4
10
57
58
56
61
43
52
21
31
24
33
13
22
1...

output:

? 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0111111111111111111111111111111111111111111111111111111111111111111111111111000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 1993 queries.

Test #16:

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

input:

150
4
52
52
55
56
35
38
21
24
8
12
13
16
4
8
9
12
1
5
8
11
49
52
51
56
31
41
15
26
23
33
13
23
8
19
5
15
3
13
50
53
51
57
29
41
15
28
21
33
11
23
8
20
4
16
1
13
50
53
50
57
29
42
40
47
29
37
18
29
12
25
6
17
4
15
51
53
53
59
29
44
43
49
31
39
16
31
16
24
7
17
3
17
51
53
52
59
28
45
42
49
29
40
16
33...

output:

? 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0111111111111111111111111111111111111111111111111111111111111111111111111111000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 2047 queries.

Test #17:

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

input:

150
3
62
61
56
58
36
38
19
22
23
25
9
11
6
8
5
7
3
5
63
61
56
58
35
39
19
24
22
26
9
13
7
11
6
10
4
8
62
60
57
59
35
41
19
26
12
19
6
13
5
12
1
9
4
11
63
60
56
59
34
42
16
27
22
30
9
19
6
17
3
13
2
12
63
60
56
59
38
45
16
28
26
33
12
23
9
20
8
19
5
16
63
60
55
59
34
45
15
31
23
34
8
23
6
22
2
17
1
1...

output:

? 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0111111111111111111111111111111111111111111111111111111111111111111111111111000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 2121 queries.

Test #18:

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

input:

150
4
64
64
62
65
42
45
27
31
19
22
13
17
7
10
5
8
2
6
3
6
63
64
59
65
69
70
45
49
23
29
32
36
17
22
12
18
6
11
3
8
62
63
59
64
42
49
27
35
20
27
16
24
6
13
3
10
2
10
1
8
63
63
59
63
43
51
38
42
23
27
14
20
8
14
6
12
5
11
63
62
60
63
43
51
27
37
15
25
13
23
9
20
4
14
63
62
59
63
40
51
23
37
21
32
17...

output:

? 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0111111111111111111111111111111111111111111111111111111111111111111111111111000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 2113 queries.

Test #19:

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

input:

150
2
50
49
42
43
24
25
11
13
16
17
9
10
7
9
2
3
1
3
1
2
51
49
42
43
24
26
28
29
13
14
8
10
7
8
4
6
3
4
1
3
2
3
52
49
43
44
24
27
30
31
16
17
9
10
6
7
5
6
3
6
2
3
53
49
41
44
54
50
35
32
21
22
13
14
7
10
6
7
1
2
51
48
41
43
52
49
33
31
21
23
17
15
12
10
8
6
3
5
5
3
48
48
41
43
23
25
12
14
9
11
5
7
2...

output:

? 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0111111111111111111111111111111111111111111111111111111111111111111111111111000000000000000000000000000000000000000000000000000000000000000000000...

result:

ok Correct answer with 2255 queries.

Test #20:

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

input:

200
1
63
63
49
49
33
34
32
32
20
20
12
12
6
7
6
6
5
5
4
4
64
63
47
48
33
35
20
24
16
18
8
10
5
7
4
6
2
6
2
4
66
64
48
49
34
36
20
24
17
19
7
11
10
12
4
8
6
8
3
7
3
5
65
64
45
49
32
37
28
32
16
20
8
13
8
12
5
9
4
8
3
7
65
63
43
50
56
54
38
41
19
23
8
15
11
15
7
14
4
8
2
9
2
6
64
63
43
49
55
54
36
41
...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 1091 queries.

Test #21:

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

input:

200
3
67
67
60
60
40
43
37
37
22
25
17
17
10
12
6
9
4
6
2
4
1
4
1
3
66
67
60
61
40
43
37
38
22
25
19
20
11
12
6
9
5
6
3
4
2
3
65
67
61
63
40
42
21
23
12
14
8
10
4
7
4
6
2
5
2
4
66
67
59
63
58
59
38
40
20
23
11
15
11
14
6
10
6
9
4
7
1
5
3
6
67
67
59
63
39
43
21
27
19
23
11
17
8
12
4
8
3
7
2
6
68
67
5...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 2473 queries.

Test #22:

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

input:

200
1
71
72
68
67
64
65
61
60
44
43
23
24
26
25
14
15
12
11
5
4
4
5
1
0
71
71
66
66

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 29 queries.

Test #23:

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

input:

200
1
68
67
64
63
38
37
21
22
22
21
13
14
10
9
8
7
5
4
3
2
66
67
62
63
39
40
21
22
11
12
4
6
7
8
5
6
2
3
66
67
61
63
40
43
42
44
18
20
9
11
7
10
4
6
2
5
2
4
66
67
59
63
65
66
49
53
35
36
21
22
12
16
10
11
5
9
5
6
3
7
2
3
63
66
74
71
64
66
41
43
22
25
22
24
7
10
17
19
8
10
5
8
3
5
64
66
59
61
40
43
2...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 3229 queries.

Test #24:

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

input:

200
1
73
73
77
78
69
69
45
45
35
35
17
17
6
7
11
11
7
7
3
4
4
4
74
73
77
78
55
56
25
27
17
19
10
13
5
9
5
8
3
6
73
72
75
77
56
59
26
29
16
21
10
16
6
11
4
10
2
7
74
72
75
77
56
61
27
32
16
23
14
19
8
14
7
13
4
10
76
73
74
76
53
60
27
35
16
26
14
22
8
17
7
16
3
13
4
13
76
73
76
78
50
60
27
38
16
28
1...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 2915 queries.

Test #25:

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

input:

200
6
82
81
96
98
80
82
46
50
25
30
19
24
11
16
6
11
82
81
95
98
80
84
43
53
21
32
27
37
13
23
8
18
3
14
5
15
81
80
94
98
78
87
43
55
21
36
28
40
15
27
10
22
7
19
82
80
95
98
74
86
41
56
21
39
15
34
6
24
5
23
2
20
82
79
100
102
75
87
40
57
20
40
25
42
11
29
8
26
3
23
5
23
82
79
99
102
72
87
41
60
20...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 2813 queries.

Test #26:

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

input:

200
2
89
88
99
100
72
73
49
51
42
43
24
26
19
20
10
11
9
10
6
7
90
88
99
100
70
74
49
53
27
32
19
26
9
14
5
10
3
8
90
87
98
99
71
75
51
56
29
36
19
26
11
19
10
17
6
13
91
87
98
99
71
76
47
57
26
36
17
30
11
21
9
19
5
15
92
87
97
98
70
77
48
60
28
41
17
30
11
24
9
22
91
87
94
97
66
78
44
61
25
44
13
...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 2969 queries.

Test #27:

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

input:

200
4
91
90
94
95
58
62
69
70
40
44
42
43
29
31
18
20
10
12
8
12
2
4
90
90
91
94
58
62
69
72
39
43
42
45
28
32
17
20
10
13
6
10
4
7
90
89
90
95
58
63
30
36
20
26
10
16
4
10
3
10
3
9
91
89
91
95
63
68
30
37
20
27
14
21
4
11
3
10
92
89
92
96
69
75
34
42
21
31
14
22
8
18
7
15
7
15
5
14
93
89
92
96
71
7...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 2977 queries.

Test #28:

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

input:

200
6
89
90
106
108
80
83
55
60
34
39
19
24
9
15
12
17
8
13
90
90
105
107
76
82
55
65
29
41
17
30
12
24
9
21
3
15
90
89
108
109
79
84
56
68
28
43
33
45
17
31
13
27
7
21
91
89
106
109
79
86
53
69
28
48
17
37
9
30
11
31
7
28
4
24
92
89
108
109
79
87
53
70
31
53
18
40
9
31
1
25
8
30
93
89
108
111
75
87...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 2915 queries.

Test #29:

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

input:

200
7
93
92
91
91
77
78
44
49
23
28
16
21
10
17
6
11
4
11
3
8
94
92
94
93
79
80
45
52
22
29
16
23
10
18
6
13
2
10
4
11
94
91
96
94
80
81
44
54
26
37
25
35
14
24
10
20
3
14
7
17
95
91
97
94
80
81
44
58
26
40
14
29
10
27
5
20
3
18
95
90
97
95
79
81
44
57
28
44
15
32
10
27
4
21
96
90
95
95
78
82
40
56
...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 2755 queries.

Test #30:

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

input:

200
2
66
67
62
63
33
35
44
45
27
28
14
16
13
14
4
5
2
3
1
2
66
67
63
64
33
35
45
46
27
29
26
27
13
14
8
9
6
7
3
5
3
4
65
66
60
63
33
36
18
22
23
26
14
17
7
10
3
6
1
5
2
5
65
66
58
63
54
55
37
42
39
40
26
31
19
20
14
17
6
9
4
7
2
5
64
65
58
63
54
55
38
42
18
23
25
29
13
17
6
10
4
8
3
7
63
65
58
65
53...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 3287 queries.

Test #31:

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

input:

200
1
74
75
72
71
61
62
54
53
40
41
42
41
23
22
13
14
12
11
7
8
5
4
3
4
2
1
73
73
55
56
64
64
40
41
41
41
23
24
19
19
8
8
5
5
3
3
1
2
2
2
74
74
55
55
33
33
19
21
19
19
10
10
3
5
7
7
4
4
2
4
2
2
72
74
72
69
60
61
47
48
30
31
17
18
11
13
7
8
4
5
2
3
72
73
53
54
33
34
19
22
19
20
10
11
4
5
4
5
2
3
72
7...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 3361 queries.

Test #32:

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

input:

200
1
63
62
55
54
40
39
28
29
19
18
9
10
12
11
7
8
6
5
4
3
3
2
63
62
53
54
38
40
35
36
18
20
23
24
10
11
6
8
4
5
3
4
1
3
2
3
65
63
51
53
38
41
35
37
15
18
26
28
11
14
15
17
8
11
7
9
3
5
1
4
2
4
66
63
51
53
38
40
28
30
16
18
9
13
7
9
4
8
3
5
65
62
49
52
34
39
35
38
16
20
10
14
5
10
5
9
4
9
1
5
66
62
...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 3353 queries.

Test #33:

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

input:

200
1
71
71
61
61
43
44
40
40
25
26
20
20
9
9
5
6
4
4
3
3
2
3
1
1
71
71
59
60
65
65
51
51
28
28
17
17
12
12
8
8
5
5
71
72
59
62
43
46
31
34
17
22
15
18
11
14
6
9
3
8
3
6
72
72
58
62
42
47
29
35
17
22
9
14
4
9
3
8
2
8
1
6
74
73
60
63
43
49
36
39
18
23
9
14
3
9
6
11
5
11
1
6
75
73
62
64
43
49
40
42
20...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 1051 queries.

Test #34:

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

input:

200
2
67
68
64
66
60
61
36
37
20
21
10
11
7
9
4
5
2
3
1
3
1
2
67
68
64
66
60
61
39
40
22
23
10
12
12
13
6
8
7
8
4
6
4
5
66
68
64
68
39
44
44
48
21
25
12
16
8
12
2
7
6
10
5
10
1
5
67
68
63
68
60
61
38
41
21
24
10
15
12
15
6
10
4
8
3
7
65
68
63
70
61
64
39
45
22
28
13
20
10
16
5
11
3
10
2
8
65
68
63
7...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 3285 queries.

Test #35:

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

input:

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

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 441 queries.

Test #36:

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

input:

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

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 789 queries.

Test #37:

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

input:

200
2
70
72
73
72
56
55
39
40
22
24
23
24
12
13
6
7
4
5
2
4
2
3
69
70
61
64
64
65
42
43
26
27
14
17
12
13
6
7
4
7
2
3
70
71
61
64
66
67
44
45
26
29
21
22
11
12
6
9
5
6
3
4
2
5
2
3
69
71
59
62
65
67
45
47
26
29
22
24
12
14
6
9
6
8
4
6
2
4
70
72
59
63
67
69
45
49
43
45
22
26
24
26
12
16
12
14
6
10
6
8...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 3465 queries.

Test #38:

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

input:

200
2
70
72
73
72
56
55
39
40
22
24
23
24
12
13
6
7
4
5
2
4
2
3
69
70
61
64
64
65
42
43
26
27
14
17
12
13
6
7
4
7
2
3
70
71
61
64
66
67
44
45
26
29
21
22
11
12
6
9
5
6
3
4
2
5
2
3
69
71
59
62
65
67
45
47
26
29
22
24
12
14
6
9
6
8
4
6
2
4
70
72
59
63
67
69
45
49
43
45
22
26
24
26
12
16
12
14
6
10
6
8...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 1811 queries.

Test #39:

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

input:

200
3
71
72
57
58
35
38
37
38
24
25
16
17
8
9
4
7
4
5
2
5
2
3
71
72
54
57
59
60
37
40
43
44
25
28
19
20
11
14
9
10
3
6
6
7
5
6
3
6
2
3
69
72
73
71
64
63
40
39
23
22
10
11
7
10
4
5
3
6
1
2
69
71
72
70
62
62
42
42
24
24
11
12
7
9
5
6
3
4
2
3
69
71
55
58
59
61
37
39
23
25
13
16
10
12
6
8
5
7
2
5
3
5
67...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 2541 queries.

Test #40:

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

input:

200
2
64
63
65
64
41
43
46
45
26
25
17
17
11
11
6
8
5
5
4
4
65
63
63
64
41
44
23
27
22
25
12
15
7
10
5
8
3
6
64
62
62
64
39
45
44
46
23
28
13
18
9
14
3
8
1
6
65
62
62
64
39
45
44
46
23
28
12
18
15
20
8
13
6
12
2
7
66
62
61
63
39
44
23
29
14
21
10
16
5
11
4
10
3
9
67
62
61
63
39
44
23
31
14
23
10
18
...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 3237 queries.

Test #41:

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

input:

200
3
76
76
69
72
57
57
42
45
35
35
26
28
16
19
10
12
4
7
6
8
4
6
3
5
75
76
69
74
56
57
42
47
34
35
23
28
15
16
8
9
4
6
4
6
2
7
2
4
72
75
69
73
53
56
42
46
33
36
23
27
14
17
7
10
3
7
4
7
3
6
1
5
3
6
72
75
70
74
44
48
27
33
19
23
11
15
4
10
7
11
4
10
3
7
73
75
67
73
43
50
34
40
18
24
12
19
10
16
5
11...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 3491 queries.

Test #42:

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

input:

200
4
65
65
55
55
44
44
24
28
26
26
18
20
12
14
8
12
4
6
65
65
56
57
41
43
24
30
23
25
13
19
11
13
6
12
5
7
3
6
2
6
65
66
54
56
40
43
24
30
23
26
13
19
11
14
6
12
5
8
3
7
1
7
2
6
65
66
52
56
39
44
24
30
22
27
11
17
14
19
6
12
8
13
6
12
2
7
65
65
53
57
40
47
33
37
20
26
9
15
5
11
3
9
2
8
65
65
53
58
...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 3413 queries.

Test #43:

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

input:

200
1
76
76
68
68
43
43
25
25
15
15
8
8
3
3
1
1
75
76
74
72
68
66
45
43
24
25
31
29
15
16
17
15
10
8
7
8
3
1
75
75
68
68
43
44
38
38
19
19
11
12
9
9
4
4
3
3
1
2
2
2
73
75
73
71
66
65
45
46
24
25
14
16
10
11
6
7
5
7
1
2
73
75
74
71
66
66
45
47
33
33
19
19
11
13
9
9
5
5
4
4
3
3
74
76
66
69
58
60
39
42...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 1501 queries.

Test #44:

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

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:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 2677 queries.

Test #45:

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

input:

200
1
99
98
1
1
1
1
1
1
1
1
1
1
1
1
1
1
100
98
1
1
1
1
1
1
1
1
1
1
1
1
1
1
100
97
1
1
1
1
1
1
1
1
1
1
1
1
1
1
101
97
1
1
1
1
1
1
1
1
1
1
1
1
1
1
101
96
1
1
1
1
1
1
1
1
1
1
1
1
1
1
102
96
1
1
1
1
1
1
1
1
1
1
1
1
1
1
102
95
1
1
1
1
1
1
1
1
1
1
1
1
1
1
103
95
1
1
1
1
1
1
1
1
1
1
1
1
1
1
103
94
1
1
1
1
...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 2701 queries.

Test #46:

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

input:

200
16
90
99
138
149
160
174
172
186
101
115
59
73
30
44
14
28
86
99
128
148
147
173
159
185
98
124
53
79
27
53
18
44
78
98
116
147
132
172
142
184
94
136
49
91
31
73
11
53
76
98
110
147
125
171
134
183
98
149
64
115
28
79
22
73
70
97
97
146
107
170
113
182
90
161
53
124
20
91
8
79
67
97
93
145
103
...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 2397 queries.

Test #47:

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

input:

200
15
92
99
138
149
162
174
173
186
100
113
61
74
29
42
15
28
87
99
131
148
150
173
159
185
91
117
62
88
33
59
16
42
85
98
123
147
139
172
146
184
92
132
59
99
34
74
19
59
77
98
111
147
123
171
129
183
86
143
56
113
31
88
17
74
69
97
98
146
109
170
114
182
85
157
45
117
27
99
16
88
59
97
86
145
96
...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 2677 queries.

Test #48:

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

input:

200
2
81
81
73
73
39
39
20
22
21
21
10
10
6
8
4
4
4
4
2
4
2
2
81
81
72
74
73
73
46
46
26
26
14
14
8
10
6
6
4
4
2
2
80
80
72
74
75
75
46
48
44
44
22
22
12
14
12
12
6
8
6
6
4
6
2
2
79
80
71
72
39
41
41
42
21
23
24
25
12
13
6
7
4
5
2
3
77
79
71
73
39
42
42
44
23
25
12
15
12
14
6
8
4
6
2
5
2
4
77
79
70
...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 3457 queries.

Test #49:

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

input:

200
2
76
77
73
75
57
58
37
38
24
25
14
15
8
10
6
7
4
6
2
3
76
77
73
74
43
44
25
26
14
17
12
13
6
7
4
5
2
3
76
78
71
74
57
59
37
39
24
26
14
17
12
14
6
9
6
8
4
7
2
4
75
78
71
74
42
45
25
29
22
25
12
15
6
9
4
8
2
5
73
77
69
74
55
59
35
39
23
27
14
19
12
16
6
10
4
8
2
7
2
6
72
77
69
75
54
59
34
39
22
2...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 3489 queries.

Test #50:

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

input:

200
2
78
77
67
69
61
60
36
37
23
24
12
14
12
13
6
8
6
7
4
5
2
4
2
3
79
77
67
69
41
43
23
26
22
24
11
13
6
8
4
6
2
4
78
76
67
71
60
58
37
38
22
26
22
23
12
13
6
10
6
7
4
8
2
3
77
76
65
68
60
59
35
38
42
41
24
24
12
15
12
12
6
6
4
4
2
5
2
2
77
77
65
67
60
60
37
38
22
23
11
12
8
9
4
5
2
3
75
77
65
68
5...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 3465 queries.

Test #51:

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

input:

200
2
75
74
66
65
42
44
43
42
25
24
14
14
8
10
6
6
4
4
2
2
74
74
67
67
42
44
44
44
26
26
14
16
12
12
6
6
4
4
2
2
73
73
66
67
42
43
24
26
24
25
12
13
6
8
6
7
4
6
2
3
73
73
64
67
65
65
41
44
39
39
24
27
24
24
12
12
6
6
4
7
2
2
70
72
76
74
62
60
37
35
22
20
12
12
8
8
4
6
4
4
2
2
71
73
75
73
64
62
38
36...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 3441 queries.

Test #52:

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

input:

200
2
76
75
69
69
42
42
23
25
22
22
12
14
12
12
6
6
4
4
2
4
2
2
77
75
66
68
68
66
42
41
24
26
24
23
12
11
6
5
4
3
2
2
77
75
66
68
70
68
42
43
26
28
24
25
12
13
6
7
4
5
2
3
78
75
67
70
72
69
43
45
26
28
14
16
8
11
6
8
4
6
2
4
78
74
67
69
42
46
37
39
20
24
20
22
10
12
4
8
6
8
4
6
2
4
79
74
66
68
42
46...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 3457 queries.

Test #53:

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

input:

200
2
62
64
70
69
61
61
42
42
23
25
23
23
12
13
6
8
6
7
4
5
2
3
63
66
71
69
62
62
40
42
23
26
23
25
12
15
11
13
6
8
4
6
2
5
2
4
63
67
72
69
61
62
41
42
23
27
24
25
12
14
6
8
4
6
2
4
62
65
64
67
42
46
39
42
22
25
12
15
6
10
6
9
4
7
2
5
63
66
61
66
64
67
41
46
39
42
19
24
22
25
12
15
6
11
6
9
4
9
2
5
...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 3441 queries.

Test #54:

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

input:

200
2
68
68
70
70
42
42
25
25
13
15
12
12
6
8
6
6
4
4
2
2
67
68
68
70
65
66
44
45
24
26
24
25
12
13
6
8
6
7
4
5
2
3
66
67
68
70
40
42
25
27
13
16
12
14
6
9
6
8
4
6
2
4
67
67
67
70
40
43
25
28
13
17
12
15
6
9
4
7
2
5
67
67
65
70
64
64
43
48
37
37
24
26
12
17
12
14
6
11
6
8
4
6
2
7
2
4
65
67
65
69
62
...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 1851 queries.

Test #55:

score: -100
Wrong Answer
time: 6ms
memory: 3584kb

input:

200
2
67
67
66
66
39
39
22
24
24
24
12
14
12
12
6
8
6
6
4
4
2
2
65
67
68
66
65
64
41
42
23
24
14
15
8
9
4
5
2
4
2
3
65
68
69
66
65
64
43
44
23
24
13
16
12
13
6
7
4
5
2
5
2
3
66
69
72
68
63
64
43
46
43
44
24
27
21
22
12
13
6
9
6
7
4
7
2
3
66
69
72
68
63
64
43
45
21
23
13
16
11
13
5
8
6
8
4
7
2
4
67
6...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

wrong answer Too many queries.