# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
776045 | 2023-07-07T08:57:16 Z | 이동현(#9992) | The Collection Game (BOI21_swaps) | C++17 | 39 ms | 7352 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> using namespace std; int ans[1024]; struct Data{ vector<int> id, mid; int state; int nxt[4]; Data(){} }; Data tr[100004]; int trn; void solve(int n, int v) { vector<int> rv = {1}; for(int i = 2; i <= n; ++i){ int low = 0, high = (int)rv.size(); while(low < high){ int mid = low + high >> 1; schedule(i, rv[mid]); auto rv = visit(); if(rv[0]){ high = mid; } else{ low = mid + 1; } } rv.push_back(0); for(int j = (int)rv.size() - 1; j > low; --j){ rv[j] = rv[j - 1]; } rv[low] = i; } answer(rv); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 7248 KB | Correct |
2 | Correct | 7 ms | 7248 KB | Correct |
3 | Correct | 17 ms | 7348 KB | Correct |
4 | Correct | 33 ms | 7332 KB | Correct |
5 | Correct | 39 ms | 7352 KB | Correct |
6 | Correct | 31 ms | 7248 KB | Correct |
7 | Correct | 33 ms | 7336 KB | Correct |
8 | Correct | 36 ms | 7352 KB | Correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 7248 KB | Correct |
2 | Correct | 8 ms | 7248 KB | Correct |
3 | Correct | 18 ms | 7248 KB | Correct |
4 | Correct | 34 ms | 7336 KB | Correct |
5 | Correct | 33 ms | 7248 KB | Correct |
6 | Correct | 17 ms | 7348 KB | Correct |
7 | Correct | 25 ms | 7352 KB | Correct |
8 | Correct | 22 ms | 7248 KB | Correct |
9 | Runtime error | 11 ms | 7352 KB | Execution killed with signal 13 |
10 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 3 ms | 7248 KB | Not correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 3 ms | 7248 KB | Not correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 3 ms | 7248 KB | Not correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 3 ms | 7248 KB | Not correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 4 ms | 7248 KB | Not correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 4 ms | 7248 KB | Not correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 3 ms | 7248 KB | Not correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 3 ms | 7248 KB | Not correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 3 ms | 7248 KB | Not correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 3 ms | 7248 KB | Not correct |
2 | Halted | 0 ms | 0 KB | - |