QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#862444#8812. Library 3sichengzhou0 1ms3840kbC++17457b2025-01-19 01:18:302025-01-19 01:18:34

Judging History

你现在查看的是最新测评结果

  • [2025-01-19 01:18:34]
  • 评测
  • 测评结果:0
  • 用时:1ms
  • 内存:3840kb
  • [2025-01-19 01:18:30]
  • 提交

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%