# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1002554 | Andrey | The Collection Game (BOI21_swaps) | C++14 | 302 ms | 1632 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "swaps.h"
#include<bits/stdc++.h>
using namespace std;
void solve(int n, int v) {
vector<int> haha(n);
for(int i = 0; i < n; i++) {
haha[i] = i+1;
}
for(int i = 0; i < v; i++) {
vector<pair<int,int>> wut(0);
for(int j = i%2; j+1 < n; j+=2) {
wut.push_back({j,j+1});
schedule(haha[j],haha[j+1]);
}
vector<int> wow = visit();
for(int j = 0; j < wow.size(); j++) {
if(wow[j] == 0) {
swap(haha[wut[j].first],haha[wut[j].second]);
}
}
}
answer(haha);
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |