QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#402366#1464. Interactive AlgorithmmonstersqwqWA 34ms3808kbC++202.9kb2024-04-30 14:18:502024-04-30 14:18:50

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

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

output:

? 2 5 3 4 1 
? 5 3 2 4 1 
? 4 2 1 5 3 
? 3 2 5 4 1 
? 2 4 1 5 3 
? 5 2 1 4 3 
? 1 4 5 2 3 
? 1 3 5 4 2 
? 2 3 4 1 5 
? 2 4 1 3 5 
? 2 3 4 5 1 
? 3 4 5 1 2 
? 5 2 1 3 4 
? 5 3 2 1 4 
? 1 2 5 4 3 
? 1 2 3 5 4 
? 4 1 2 3 5 
? 5 2 3 4 1 
? 4 2 1 3 5 
? 1 4 2 3 5 
? 2 4 5 3 1 
? 1 3 4 5 2 
? 5 3 1 2 4 
?...

result:

ok n=5, 78 queries

Test #2:

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

input:

2
1

output:

? 2 1 
! 2 1 

result:

ok n=2, 1 queries

Test #3:

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

input:

3
1
1
1
1
2

output:

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

result:

ok n=3, 5 queries

Test #4:

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

input:

4
2
2
3

output:

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

result:

ok n=4, 3 queries

Test #5:

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

input:

5
1
1
2
0
2
1
0
2
2
2
2
2
2
0
1
0
0
1
2
1
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 1 
? 1 4 2 7 5 3 6 
? 6 1 4 3 5 2 7 
? 2 1 7 4 6 3 5 
? 2 5 6 7 4 3 1 
? 4 7 5 3 2 6 1 
? 1 5 3 4 6 2 7 
? 4 3 5 7 2 1 6 
? 4 7 5 6 3...

result:

ok n=7, 1523 queries

Test #7:

score: -100
Wrong Answer
time: 34ms
memory: 3712kb

input:

10
3
1
2
2
2
3
3
1
1
4
1
2
2
1
2
2
0
4
2
2
1
1
2
2
3
1
2
0
3
3
1
2
1
2
0
1
3
2
3
1
2
1
3
3
1
3
3
1
2
0
1
3
3
2
2
1
0
1
3
1
3
1
1
0
0
1
1
2
3
0
1
3
3
1
0
1
1
1
0
2
4
2
1
2
3
0
1
1
1
4
2
2
4
4
2
5
1
4
1
0
0
0
2
4
2
2
2
1
0
5
2
3
2
2
2
2
2
3
4
2
2
1
3
3
3
4
3
2
3
0
3
1
2
3
3
1
3
2
0
0
4
2
3
0
0
0
1
2
1...

output:

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

result:

wrong answer Elements should be distinct.