Submission #732000

# Submission time Handle Problem Language Result Execution time Memory
732000 2023-04-28T08:24:28 Z Stickfish The Collection Game (BOI21_swaps) C++17
0 / 100
1 ms 208 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"
using namespace std;

void solve(int N, int V) {
    vector<int> v = {0};
    for (int p = 1; p < N; ++p) {
        int lb = -1, ub = p;
        while (ub - lb > 1) {
            int mb = (lb + ub) / 2;
            schedule(v[mb] + 1, p + 1);
            int a = visit()[0];
            if (a)
                ub = mb;
            else
                lb = mb;
        }
        v.insert(v.begin() + ub, p);
    }
    answer(v);
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 208 KB Not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 208 KB Not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 208 KB Not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 208 KB Not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 208 KB Not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 208 KB Not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 208 KB Not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 208 KB Not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 208 KB Not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 208 KB Not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 208 KB Not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 208 KB Not correct
2 Halted 0 ms 0 KB -