Submission #971664

# Submission time Handle Problem Language Result Execution time Memory
971664 2024-04-29T07:05:59 Z idas The Collection Game (BOI21_swaps) C++17
3 / 100
29 ms 496 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 <bits/stdc++.h>

using namespace std;

#include "swaps.h"
#define FOR(i, begin, end) for(int i=(begin); i<(end); i++)
#define sz(x) int((x).size())
#define pb push_back
#define s second
#define f first

typedef vector<int> vi;
typedef pair<int, int> pii;

const int NN=510;

bool cmp[NN][NN];

void solve(int n, int v)
{
    vi ans(n); FOR(i, 0, n) ans[i]=i+1;
    FOR(i, 1, n+1)
    {
        FOR(j, i+1, n+1)
        {
            schedule(i, j);
            vi get=visit();
            if(get.back()==0){
                swap(ans[i-1], ans[j-1]);
            }
        }
    }

    answer(ans);
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 KB Not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Correct
2 Correct 25 ms 340 KB Correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Correct
2 Correct 25 ms 340 KB Correct
3 Incorrect 0 ms 344 KB Not correct
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Correct
2 Correct 28 ms 344 KB Correct
3 Runtime error 29 ms 424 KB Execution killed with signal 13
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Correct
2 Correct 28 ms 344 KB Correct
3 Runtime error 29 ms 424 KB Execution killed with signal 13
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Correct
2 Correct 24 ms 344 KB Correct
3 Runtime error 25 ms 496 KB Execution killed with signal 13
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Correct
2 Correct 24 ms 344 KB Correct
3 Runtime error 25 ms 496 KB Execution killed with signal 13
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Correct
2 Correct 25 ms 344 KB Correct
3 Runtime error 21 ms 420 KB Execution killed with signal 13
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Correct
2 Correct 25 ms 344 KB Correct
3 Runtime error 21 ms 420 KB Execution killed with signal 13
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Correct
2 Correct 24 ms 344 KB Correct
3 Runtime error 25 ms 420 KB Execution killed with signal 13
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Correct
2 Correct 24 ms 344 KB Correct
3 Runtime error 25 ms 420 KB Execution killed with signal 13
4 Halted 0 ms 0 KB -