QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#359162#8239. Mysterious Treenew_dawn_2#WA 3ms3836kbC++202.3kb2024-03-20 14:02:312024-03-20 14:02:31

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

2
4
1
1
4
0
1
1
1

output:

? 1 2
? 3 4
! 1
? 1 2
? 3 4
? 3 1
? 3 2
! 2

result:

ok Correct (2 test cases)

Test #2:

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

input:

87
13
0
0
0
0
0
1
0
0
1
1
15
0
0
0
0
0
0
1
0
1
1
7
0
0
0
1
1
1
15
0
0
0
1
1
0
0
1
19
0
0
0
0
0
1
0
0
0
0
1
1
20
0
0
0
0
0
0
0
0
0
0
7
0
0
1
0
0
1
1
20
0
0
0
0
0
0
0
1
0
0
1
1
17
0
0
0
0
0
0
0
0
0
11
1
1
0
0
0
0
14
0
0
0
0
0
0
0
13
0
0
0
0
0
0
0
18
0
0
0
0
0
1
0
0
0
0
1
1
14
0
1
0
0
0
0
0
0
1
1
20
0
...

output:

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

result:

ok Correct (87 test cases)

Test #3:

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

input:

135
9
1
0
1
1
0
6
0
0
0
11
0
0
0
0
1
0
0
0
4
1
1
10
0
0
0
0
1
1
1
9
0
0
0
1
0
1
1
9
0
0
1
0
0
0
1
1
6
0
0
0
9
0
0
0
1
0
1
1
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
? 5 6
! 1
? 1 2
? 3 4
? 5 6
? 7 8
? 9 1
? 5 1
? 6 1
? 6 2
! 2
? 1 2
? 3 4
? 5 6
? 7 1
? 3 1
? 3 2
! 2...

result:

wrong answer Integer 8 violates the range [1, 7] (test case 85)