QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#415405#1464. Interactive AlgorithmMilmonTL 1ms3852kbC++141.3kb2024-05-20 20:58:462024-05-20 20:58:46

詳細信息

Test #1:

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

input:

5
2
0
2
2
1
0
2
2
0

output:

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

result:

ok n=5, 9 queries

Test #2:

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

input:

2

output:

! 1 2

result:

ok n=2, 0 queries

Test #3:

score: -100
Time Limit Exceeded

input:

3
1
1
2
2
1
1
2
1
1
1
1
1
1
1
1
2
1
1
1
1
1
1
1
2
1
1
2
1
1
1
1
1
1
1
2
2
2
1
2
1
1
1
2
1
1
1
2
1
1
1
2
2
1
1
1
2
2
2
2
1
1
1
2
1
2
2
1
1
2
2
1
1
2
1
2
1
1
2
1
2
1
1
2
1
2
2
1
1
2
1
2
1
2
2
2
1
1
1
1
2
2
1
2
1
1
1
1
1
1
1
1
1
2
1
1
2
1
1
2
2
1
1
1
1
2
2
1
1
1
2
1
1
1
1
2
1
1
2
2
1
1
2
2
2
1
1
2
2
1
...

output:

? 2 1 3
? 2 3 1
? 1 2 3
? 1 2 3
? 2 1 3
? 3 1 2
? 1 2 3
? 3 1 2
? 2 3 1
? 2 1 3
? 2 3 1
? 2 3 1
? 1 3 2
? 3 1 2
? 1 3 2
? 3 2 1
? 2 1 3
? 1 3 2
? 2 1 3
? 2 1 3
? 2 3 1
? 2 3 1
? 3 1 2
? 1 2 3
? 3 1 2
? 2 1 3
? 1 2 3
? 3 1 2
? 2 3 1
? 3 1 2
? 2 1 3
? 3 1 2
? 2 3 1
? 2 3 1
? 3 2 1
? 3 2 1
? 3 2 1
? 2 ...

result: