QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#862444 | #8812. Library 3 | sichengzhou | 0 | 1ms | 3840kb | C++17 | 457b | 2025-01-19 01:18:30 | 2025-01-19 01:18:34 |
answer
#include "library3.h"
#include <bits/stdc++.h>
using namespace std;
void solve(int N) {
std::vector<int> b(N, 0);
for (int i = 0; i < N; i++) {
b[i] = i;
}
int ret=query(b);
for (int i = 0; i < N; i++){
int x=i,cur=ret;
for (int j = i+1; j < N; j++){
swap(b[i],b[j]);
ret=query(b);
if(ret<cur)
{
cur=ret;
x=j;
}
swap(b[i],b[j]);
}
swap(b[i],b[x]);
ret=cur;
}
answer(b);
}
詳細信息
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 2
Accepted
time: 0ms
memory: 3712kb
input:
2 0 1
output:
? 0 1 ? 1 0 ! 0 1 -
result:
ok Accepted
Test #2:
score: 2
Accepted
time: 1ms
memory: 3840kb
input:
3 2 1 1 0
output:
? 0 1 2 ? 1 0 2 ? 2 1 0 ? 1 2 0 ! 1 2 0 -
result:
ok Accepted
Test #3:
score: 2
Accepted
time: 0ms
memory: 3712kb
input:
4 3 2 2 2 1 1 0
output:
? 0 1 2 3 ? 1 0 2 3 ? 2 1 0 3 ? 3 1 2 0 ? 1 2 0 3 ? 1 3 2 0 ? 1 2 3 0 ! 1 2 3 0 -
result:
ok Accepted
Test #4:
score: 0
Wrong Answer
time: 0ms
memory: 3712kb
input:
5 2 1 3 1 3 2 2 2 2 2 2
output:
? 0 1 2 3 4 ? 1 0 2 3 4 ? 2 1 0 3 4 ? 3 1 2 0 4 ? 4 1 2 3 0 ? 1 2 0 3 4 ? 1 3 2 0 4 ? 1 4 2 3 0 ? 1 0 3 2 4 ? 1 0 4 3 2 ? 1 0 2 4 3 ! 1 0 2 3 4 -
result:
wrong answer Wrong Answer [8]
Subtask #2:
score: 0
Skipped
Dependency #1:
0%
Subtask #3:
score: 0
Skipped
Dependency #2:
0%