# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1016594 | 2024-07-08T08:40:58 Z | MohamedFaresNebili | The Collection Game (BOI21_swaps) | C++14 | 1 ms | 344 KB |
#include <bits/stdc++.h> #include "swaps.h" using namespace std; vector<int> dcS(vector<int> A) { if(A.size() <= 1) return A; vector<int> X, Y; int N = A.size(); for(int l = 0; l < N / 2; l++) X.push_back(A[l]); for(int l = N / 2; l < N; l++) Y.push_back(A[l]); X = dcS(X), Y = dcS(Y); int i = 0, j = 0; while(i != X.size() || j != Y.size()) { if(i == X.size()) A.push_back(Y[j++]); else if(j == Y.size()) A.push_back(X[i++]); else { schedule(X[i], Y[j]); vector<int> K = visit(); if(K[0] == 0) A.push_back(Y[j++]); else A.push_back(X[i++]); } } return A; } void solve(int N, int V) { vector<int> res(N); for(int l = 0; l < N; l++) res[l] = l + 1; res = dcS(res); answer(res); }
Compilation message
# | 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 | Incorrect | 1 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 | Incorrect | 1 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 | Incorrect | 1 ms | 344 KB | Not correct |
2 | Halted | 0 ms | 0 KB | - |
# | 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 | 0 ms | 344 KB | Not correct |
2 | Halted | 0 ms | 0 KB | - |
# | 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 | 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 | Incorrect | 1 ms | 344 KB | Not correct |
2 | Halted | 0 ms | 0 KB | - |