QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#773958#9783. Duloc Networkucup-team4778#WA 14ms3896kbC++23994b2024-11-23 10:59:402024-11-23 10:59:40

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

4
2
3
2
1
2
1
2
1
0

output:

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

result:

ok Correct answer with 9 queries.

Test #2:

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

input:

2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

output:

? 10
? 01
? 11
? 01
? 10
? 11
? 01
? 10
? 11
? 10
? 01
? 11
? 10
? 01
? 11
? 01
? 10
? 11
? 01
? 10
? 11
? 10
? 01
? 11
? 01
? 10
? 11
? 10
? 01
? 11
? 01
? 10
? 11
? 10
? 01
? 11
? 01
? 10
? 11
? 10
? 01
? 11
? 01
? 10
? 11
? 01
? 10
? 11
? 10
? 01
? 11
? 01
? 10
? 11
? 10
? 01
? 11
? 01
? 10
? 11
...

result:

ok Correct answer with 3498 queries.

Test #3:

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

input:

4
2
3
2
1
2
1
2
1
0

output:

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

result:

ok Correct answer with 9 queries.

Test #4:

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

input:

2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

output:

? 10
? 01
? 11
? 01
? 10
? 11
? 01
? 10
? 11
? 10
? 01
? 11
? 10
? 01
? 11
? 01
? 10
? 11
? 01
? 10
? 11
? 10
? 01
? 11
? 01
? 10
? 11
? 10
? 01
? 11
? 01
? 10
? 11
? 10
? 01
? 11
? 01
? 10
? 11
? 10
? 01
? 11
? 01
? 10
? 11
? 01
? 10
? 11
? 10
? 01
? 11
? 01
? 10
? 11
? 10
? 01
? 11
? 01
? 10
? 11
...

result:

ok Correct answer with 3498 queries.

Test #5:

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

input:

50
4
4
6
3
4
6
3
3
6
3
3
4
3
3
6
3
1
4
2
2
3
3
1
4
1
4
5
3
3
6
2
3
3
3
3
6
1
1
2
2
4
6
1
4
5
1
1
2
3
2
5
1
2
3
6
2
7
3
3
6
1
1
2
4
3
7
2
1
3
1
1
2
2
2
4
3
4
7
2
1
3
1
2
3
2
6
8
4
2
6
4
1
5
1
3
4
4
7
11
3
1
4
1
3
4
3
3
5
1
4
5
6
1
6
3
3
6
2
6
7
2
1
3
1
3
4
6
1
7
1
1
1
1
3
4
6
2
7
1
7
8
2
1
3
2
2
4
1
...

output:

? 00000000000000000000010000000000000000000000000000
? 00000000000000000000000001000000000000000000000000
? 00000000000000000000010001000000000000000000000000
? 00000000000000000000000100000000000000000000000000
? 00000000000000000000000000000000000000100000000000
? 000000000000000000000001000000000...

result:

ok Correct answer with 3498 queries.

Test #6:

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

input:

50
15
10
22
13
8
18
14
22
29
10
12
19
8
9
13
9
7
15
9
10
17
9
16
22
10
19
27
10
10
18
11
11
22
7
8
13
10
11
20
18
15
28
10
10
19
13
27
31
13
31
33
8
28
30
22
9
24
6
11
15
13
24
29
8
9
16
16
29
34
15
10
22
5
18
20
11
20
27
10
6
16
10
19
27
27
13
29
10
11
18
20
13
26
33
15
36
34
15
38
10
30
30
8
6
13
...

output:

? 00000000000010000000000000000000000000000000000000
? 00000000000000000000000001000000000000000000000000
? 00000000000010000000000001000000000000000000000000
? 00000000000000000000000000010000000000000000000000
? 00000100000000000000000000000000000000000000000000
? 000001000000000000000000000100000...

result:

ok Correct answer with 153 queries.

Test #7:

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

input:

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

output:

? 00000000000010000000000000000000000000000000000000
? 00000000000000000000000001000000000000000000000000
? 00000000000010000000000001000000000000000000000000
? 00000000000000000000000000000000000001000000000000
? 00000000000000000010000000000000000000000000000000
? 000000000000000000100000000000000...

result:

ok Correct answer with 3498 queries.

Test #8:

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

input:

50
8
12
19
5
12
17
10
4
14
13
10
21
7
6
13
8
9
17
7
9
14
9
7
15
8
5
13
10
14
21
9
6
14
14
11
23
9
4
12
11
11
19
9
4
11
5
12
17
21
4
23
19
9
22
8
8
14
8
5
10
8
5
13
10
8
15
8
23
29
8
14
19
8
10
15
5
7
11
23
12
25
9
22
24
21
15
25
9
10
16
24
12
26
7
8
12
14
12
26
25
15
28
12
10
18
25
11
28
2
7
9
26
16...

output:

? 00000000000010000000000000000000000000000000000000
? 00000000000000000000000001000000000000000000000000
? 00000000000010000000000001000000000000000000000000
? 00000000000000000000000000010000000000000000000000
? 00000100000000000000000000000000000000000000000000
? 000001000000000000000000000100000...

result:

ok Correct answer with 174 queries.

Test #9:

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

input:

50
1
1
2
2
1
3
1
1
2
3
1
2
1
3
4
1
3
4
1
1
2
1
3
4
1
2
3
1
1
2
1
1
2
1
1
2
1
1
0
1
1
2
2
1
3
2
1
3
2
1
3
1
2
3
2
1
3
1
1
2
2
2
4
2
2
4
1
2
3
3
1
4
1
0
1
1
1
2
1
1
2
3
2
4
1
1
2
5
2
7
1
1
2
1
2
3
1
2
3
1
2
3
3
1
4
1
1
2
1
1
2
1
2
3
1
1
2
1
3
4
2
1
3
1
1
2
2
3
5
1
2
3
1
1
2
1
0
1
2
1
1
0
1
1
1
1
2
0
1...

output:

? 00000000000010000000000000000000000000000000000000
? 00000000000000000000000001000000000000000000000000
? 00000000000010000000000001000000000000000000000000
? 00000000000000000000000000000000000001000000000000
? 00000000000000000010000000000000000000000000000000
? 000000000000000000100000000000000...

result:

ok Correct answer with 3498 queries.

Test #10:

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

input:

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

output:

? 0000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000
? 00000000000010000000000000000000000000000000000000000000000000000000000000010000000000000000...

result:

ok Correct answer with 3498 queries.

Test #11:

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

input:

100
9
6
15
5
11
16
9
5
14
10
12
21
6
12
17
5
13
17
8
7
15
11
5
13
10
8
17
6
6
12
6
10
14
8
5
13
16
17
32
8
13
19
8
7
14
9
16
24
13
9
21
14
12
25
6
13
19
11
7
18
7
8
15
10
6
14
10
10
19
11
7
16
12
5
16
9
9
16
13
15
24
12
12
22
24
6
29
5
8
13
14
11
24
8
8
16
8
8
15
32
8
39
6
10
16
39
15
44
8
21
25
16
...

output:

? 0000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000
? 00000000000010000000000000000000000000000000000000000000000000000000000000010000000000000000...

result:

ok Correct answer with 351 queries.

Test #12:

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

input:

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

output:

? 0000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000
? 00000000000010000000000000000000000000000000000000000000000000000000000000010000000000000000...

result:

ok Correct answer with 1179 queries.

Test #13:

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

input:

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

output:

? 0000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000
? 00000000000010000000000000000000000000000000000000000000000000000000000000010000000000000000...

result:

ok Correct answer with 3498 queries.

Test #14:

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

input:

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

output:

? 0000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000
? 00000000000010000000000000000000000000000000000000000000000000000000000000010000000000000000...

result:

ok Correct answer with 3498 queries.

Test #15:

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

input:

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

output:

? 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000
? 0000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000...

result:

wrong answer Wrong answer.