답안 #1070180

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1070180 2024-08-22T12:06:42 Z erray The Collection Game (BOI21_swaps) C++17
35 / 100
40 ms 1568 KB
#include "swaps.h"
#include <bits/stdc++.h>

using namespace std;

#ifdef DEBUG 
  #include "/home/ioi/contests/debug.h"
#else 
  #define debug(...) void(37)
#endif

void solve(int N, int V) {
  vector<int> ord(N);
  iota(ord.begin(), ord.end(), 1);
  for (int i = 0; i <= N; ++i) {
    vector<array<int, 2>> qs;
    for (int j = i % 2; j + 1 < N; j += 2) {
      debug(j);
      schedule(ord[j], ord[j + 1]);
      qs.push_back({j, j + 1});
    }
    auto res = visit();
    for (int i = 0; i < int(res.size()); ++i) {
      if (!res[i]) {
        swap(ord[qs[i][0]], ord[qs[i][1]]);
      }
    }
  }
  answer(ord);
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Correct
2 Correct 1 ms 344 KB Correct
3 Correct 7 ms 344 KB Correct
4 Correct 25 ms 440 KB Correct
5 Correct 26 ms 444 KB Correct
6 Correct 39 ms 548 KB Correct
7 Correct 28 ms 1568 KB Correct
8 Correct 25 ms 444 KB Correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Correct
2 Correct 2 ms 344 KB Correct
3 Correct 7 ms 344 KB Correct
4 Correct 26 ms 632 KB Correct
5 Correct 26 ms 444 KB Correct
6 Correct 39 ms 444 KB Correct
7 Correct 27 ms 444 KB Correct
8 Correct 30 ms 620 KB Correct
9 Correct 40 ms 968 KB Correct
10 Correct 26 ms 444 KB Correct
11 Correct 26 ms 652 KB Correct
12 Correct 25 ms 420 KB Correct
13 Correct 25 ms 584 KB Correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Correct
2 Correct 2 ms 600 KB Correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Correct
2 Correct 2 ms 600 KB Correct
3 Correct 0 ms 344 KB Correct
4 Correct 2 ms 440 KB Correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Correct
2 Correct 2 ms 436 KB Correct
3 Correct 7 ms 344 KB Correct
4 Correct 24 ms 604 KB Correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Correct
2 Correct 2 ms 436 KB Correct
3 Correct 7 ms 344 KB Correct
4 Correct 24 ms 604 KB Correct
5 Correct 1 ms 344 KB Correct
6 Correct 1 ms 344 KB Correct
7 Correct 11 ms 344 KB Correct
8 Correct 26 ms 416 KB Correct
9 Correct 26 ms 528 KB Correct
10 Correct 29 ms 440 KB Correct
11 Correct 25 ms 468 KB Correct
12 Correct 26 ms 416 KB Correct
13 Correct 0 ms 596 KB Correct
14 Correct 2 ms 344 KB Correct
15 Correct 11 ms 344 KB Correct
16 Correct 29 ms 444 KB Correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Correct
2 Correct 2 ms 344 KB Correct
3 Correct 12 ms 344 KB Correct
4 Correct 26 ms 440 KB Correct
5 Runtime error 28 ms 668 KB Execution killed with signal 13
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Correct
2 Correct 2 ms 344 KB Correct
3 Correct 12 ms 344 KB Correct
4 Correct 26 ms 440 KB Correct
5 Runtime error 28 ms 668 KB Execution killed with signal 13
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Correct
2 Correct 2 ms 600 KB Correct
3 Correct 7 ms 344 KB Correct
4 Correct 24 ms 552 KB Correct
5 Runtime error 27 ms 424 KB Execution killed with signal 13
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Correct
2 Correct 2 ms 600 KB Correct
3 Correct 7 ms 344 KB Correct
4 Correct 24 ms 552 KB Correct
5 Runtime error 27 ms 424 KB Execution killed with signal 13
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Correct
2 Correct 2 ms 344 KB Correct
3 Correct 7 ms 344 KB Correct
4 Correct 26 ms 448 KB Correct
5 Runtime error 27 ms 568 KB Execution killed with signal 13
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Correct
2 Correct 2 ms 344 KB Correct
3 Correct 7 ms 344 KB Correct
4 Correct 26 ms 448 KB Correct
5 Runtime error 27 ms 568 KB Execution killed with signal 13
6 Halted 0 ms 0 KB -