Submission #1050484

# Submission time Handle Problem Language Result Execution time Memory
1050484 2024-08-09T10:08:31 Z shiomusubi496 The Collection Game (BOI21_swaps) C++17
12 / 100
268 ms 808 KB
//
// --- Sample implementation for the task swaps ---
//
// To compile this program with the sample grader, place:
//     swaps.h swaps_sample.cpp sample_grader.cpp
// in a single folder and run:
//     g++ swaps_sample.cpp sample_grader.cpp
// in this folder.
//
#include "swaps.h"
#include <bits/stdc++.h>

#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define rep2(i, a, b) for (int i = (int)(a); i < (int)(b); ++i)
#define rrep(i, n) for (int i = (int)(n) - 1; i >= 0; --i)
#define rrep2(i, a, b) for (int i = (int)(b) - 1; i >= (int)(a); --i)
#define all(v) begin(v), end(v)
#define rall(v) rbegin(v), rend(v)

using namespace std;

using ll = long long;

template<class T, class U> bool chmin(T& a, const U& b) { return a > b ? a = b, true : false; }
template<class T, class U> bool chmax(T& a, const U& b) { return a < b ? a = b, true : false; }

mt19937 mt(random_device{}());

void solve(int N, int V) {
    rep (_, V) {
        vector<int> P(N); iota(all(P), 1);
        shuffle(all(P), mt);
        rep (i, N / 2) {
            auto [x, y] = minmax(P[i * 2], P[i * 2 + 1]);
            schedule(x, y);
        }
        visit();
    }
    vector<int> P(N); iota(all(P), 1);
    answer(P);
}
# Verdict Execution time Memory Grader output
1 Incorrect 24 ms 344 KB Not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 25 ms 344 KB Not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 27 ms 344 KB Correct
2 Correct 62 ms 344 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 27 ms 344 KB Correct
2 Correct 62 ms 344 KB Correct
3 Incorrect 22 ms 344 KB Not correct
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 36 ms 344 KB Correct
2 Correct 80 ms 344 KB Correct
3 Correct 145 ms 420 KB Correct
4 Correct 256 ms 672 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 36 ms 344 KB Correct
2 Correct 80 ms 344 KB Correct
3 Correct 145 ms 420 KB Correct
4 Correct 256 ms 672 KB Correct
5 Incorrect 34 ms 344 KB Not correct
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 26 ms 344 KB Correct
2 Correct 65 ms 344 KB Correct
3 Correct 127 ms 416 KB Correct
4 Correct 268 ms 732 KB Correct
5 Incorrect 25 ms 672 KB Not correct
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 26 ms 344 KB Correct
2 Correct 65 ms 344 KB Correct
3 Correct 127 ms 416 KB Correct
4 Correct 268 ms 732 KB Correct
5 Incorrect 25 ms 672 KB Not correct
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 25 ms 344 KB Correct
2 Correct 67 ms 344 KB Correct
3 Correct 126 ms 416 KB Correct
4 Correct 230 ms 808 KB Correct
5 Incorrect 32 ms 420 KB Not correct
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 25 ms 344 KB Correct
2 Correct 67 ms 344 KB Correct
3 Correct 126 ms 416 KB Correct
4 Correct 230 ms 808 KB Correct
5 Incorrect 32 ms 420 KB Not correct
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 25 ms 344 KB Correct
2 Correct 60 ms 344 KB Correct
3 Correct 135 ms 416 KB Correct
4 Correct 235 ms 684 KB Correct
5 Incorrect 22 ms 416 KB Not correct
6 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 25 ms 344 KB Correct
2 Correct 60 ms 344 KB Correct
3 Correct 135 ms 416 KB Correct
4 Correct 235 ms 684 KB Correct
5 Incorrect 22 ms 416 KB Not correct
6 Halted 0 ms 0 KB -