QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#791735#9783. Duloc Networkucup-team4740#WA 10ms3972kbC++171.2kb2024-11-28 20:37:012024-11-28 20:37:03

详细

Test #1:

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

input:

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

output:

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

result:

ok Correct answer with 15 queries.

Test #2:

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

input:

2
0
0
0

output:

? 10
? 01
? 11
! 0

result:

ok Correct answer with 3 queries.

Test #3:

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

input:

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

output:

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

result:

ok Correct answer with 15 queries.

Test #4:

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

input:

2
0
0
0

output:

? 10
? 01
? 11
! 0

result:

ok Correct answer with 3 queries.

Test #5:

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

input:

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

output:

? 10000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111
? 11111111111111111111111111111111111111111111111111
? 01111111111111111111111111000000000000000000000000
? 11111111111111111111111111000000000000000000000000
? 011111111111110000000000000000000...

result:

ok Correct answer with 686 queries.

Test #6:

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

input:

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

output:

? 10000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111
? 11111111111111111111111111111111111111111111111111
? 01111111111111111111111111000000000000000000000000
? 11111111111111111111111111000000000000000000000000
? 011111111111110000000000000000000...

result:

ok Correct answer with 609 queries.

Test #7:

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

input:

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

output:

? 10000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111
? 11111111111111111111111111111111111111111111111111
? 01111111111111111111111111000000000000000000000000
? 11111111111111111111111111000000000000000000000000
? 011111111111110000000000000000000...

result:

ok Correct answer with 643 queries.

Test #8:

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

input:

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

output:

? 10000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111
? 11111111111111111111111111111111111111111111111111
? 01111111111111111111111111000000000000000000000000
? 11111111111111111111111111000000000000000000000000
? 011111111111110000000000000000000...

result:

ok Correct answer with 609 queries.

Test #9:

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

input:

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

output:

? 10000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111
? 11111111111111111111111111111111111111111111111111
? 01111111111111111111111111000000000000000000000000
? 11111111111111111111111111000000000000000000000000
? 011111111111110000000000000000000...

result:

ok Correct answer with 75 queries.

Test #10:

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

input:

100
1
1
0
28
29
30
29
25
24
15
14
9
10
9
8
4
3
3
4
1
0
0
0
0

output:

? 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
? 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 24 queries.

Test #11:

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

input:

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

output:

? 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
? 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 1429 queries.

Test #12:

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

input:

100
5
1
0
36
36
46
46
29
32
21
24
12
16
6
11
6
10
4
8
8
2
0
37
36
44
46
29
34
22
28
10
18
14
20
10
16
2
9
9
3
0
37
37
42
46
29
36
21
29
10
19
17
25
12
20
8
16
16
4
0
38
37
41
46
25
36
15
29
8
22
6
22
2
16
16
5
0
37
36
40
46
25
37
16
30
8
24
12
26
9
25
4
18
18
6
0
38
36
38
45
26
38
14
31
8
26
12
29
9...

output:

? 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
? 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 1457 queries.

Test #13:

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

input:

100
1
1
0
34
33
38
39
29
28
15
15
8
8
5
6
5
5
2
3
3
3
3
2
0
35
33
38
38
22
22
11
12
6
9
5
6
4
5
1
4
3
4
4
3
0
34
32
38
39
22
23
12
13
6
10
6
7
2
6
4
5
5
4
0
32
32
36
39
18
23
24
27
11
16
14
17
9
14
5
8
4
7
1
4
4
4
0
33
33
34
38
28
28
15
16
5
9
10
11
5
9
6
7
2
6
4
5
5
4
0
30
33
34
38
18
23
22
26
11
1...

output:

? 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
? 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 920 queries.

Test #14:

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

input:

100
1
1
0
29
30
29
28
26
25
17
16
9
8
7
8
2
1
2
1
1
0
0
0
0

output:

? 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
? 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 24 queries.

Test #15:

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

input:

150
4
1
0
58
58
56
57
44
46
24
28
27
29
15
18
8
11
4
7
2
6
2
5
5
2
0
59
58
57
57
45
47
24
27
12
17
15
18
9
12
6
9
2
7
4
7
7
3
0
58
58
56
58
43
48
23
29
12
19
14
20
8
15
6
12
4
10
10
4
0
58
58
55
57
45
51
23
32
12
21
7
17
5
14
2
11
11
5
0
59
58
59
61
46
52
26
37
22
28
14
21
6
17
8
15
3
10
10
6
0
57
5...

output:

? 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 2485 queries.

Test #16:

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

input:

150
4
1
0
52
52
55
56
35
38
21
24
8
12
13
16
10
13
9
12
1
5
8
11
11
2
0
49
52
51
56
31
41
15
26
23
33
13
23
6
17
7
17
4
15
3
13
13
3
0
50
53
51
57
29
41
15
28
21
33
12
25
9
21
5
18
4
16
3
16
1
13
13
4
0
50
53
50
57
29
42
40
47
22
31
17
27
12
22
9
21
4
17
5
17
17
5
0
51
53
52
59
29
44
15
32
21
36
12
...

output:

? 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 2563 queries.

Test #17:

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

input:

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

output:

? 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 2722 queries.

Test #18:

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

input:

150
4
1
0
64
64
62
65
42
45
27
31
19
22
9
12
6
9
5
8
2
6
3
6
6
2
0
63
64
59
65
69
70
44
46
27
29
16
19
10
14
9
13
5
9
9
3
0
63
63
59
64
42
48
27
35
15
23
13
21
9
18
4
12
12
4
0
63
63
58
64
41
50
25
36
16
28
11
22
7
19
4
15
2
14
2
13
13
5
0
63
62
59
65
40
49
24
37
22
31
11
22
5
18
6
17
3
15
15
6
0
62...

output:

? 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 2638 queries.

Test #19:

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

input:

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

output:

? 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 0111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 2689 queries.

Test #20:

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

input:

200
1
1
0
63
63
49
49
33
34
32
32
16
17
19
19
11
11
6
7
6
6
2
3
4
4
4
2
0
64
63
47
48
33
35
20
24
16
18
10
13
4
8
6
9
4
7
3
6
6
3
0
65
64
47
49
33
36
20
26
16
19
8
14
8
11
3
9
5
8
4
7
2
5
5
3
0
65
64
45
49
32
37
28
32
16
21
16
20
8
12
5
9
4
8
3
7
7
4
0
65
63
43
50
56
54
30
31
16
20
9
16
8
12
5
11
3
...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 1229 queries.

Test #21:

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

input:

200
3
1
0
67
67
60
60
40
43
37
37
20
20
12
12
8
11
4
4
2
4
1
3
3
2
0
66
67
60
61
40
43
37
38
22
23
12
13
8
11
4
5
3
4
1
4
2
3
3
3
0
65
67
61
63
40
42
21
23
12
14
8
10
4
7
4
6
2
4
4
4
0
66
67
59
63
58
59
36
39
21
24
14
18
8
11
3
7
5
8
3
6
1
5
2
5
5
5
0
64
67
59
64
59
62
36
41
39
42
23
26
13
16
5
10
8...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 2869 queries.

Test #22:

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

input:

200
1
1
0
71
72
68
67
62
61
44
43
23
24
26
25
12
11
5
4
4
5
1
0
0
0
0

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

ok Correct answer with 26 queries.

Test #23:

score: -100
Wrong Answer
time: 0ms
memory: 3640kb

input:

200
1
1
0
68
67
64
63
38
37
21
22
22
21
10
9
8
7
5
4
3
2
2
1
0
66
67
62
63
39
40
21
22
11
12
4
6
7
8
5
7
2
3
3
2
0
66
67
61
63
40
43
42
44
29
32
16
18
11
14
8
10
5
7
3
5
1
4
2
4
4
3
0
66
67
59
63
65
66
37
38
22
23
13
17
11
12
6
7
4
5
2
6
2
3
3
3
0
63
66
74
71
63
60
38
39
22
25
20
21
11
12
7
10
4
5
3...

output:

? 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
? 01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...

result:

wrong answer Too many queries.