# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
653836 | couplefire | Art Collections (BOI22_art) | C++17 | 1690 ms | 664 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 "art.h"
#include <bits/stdc++.h>
using namespace std;
void solve(int n) {
vector<int> permu;
for (int i = 1; i <= n; ++i) {
permu.push_back(i);
}
int cur = publish(permu);
for (int i = 1; i < n; ++i) {
vector<int> tmp_permu = permu;
tmp_permu.erase(tmp_permu.begin()+i);
tmp_permu.insert(tmp_permu.begin(), permu[i]);
int tmp_cur = publish(tmp_permu);
int x = (tmp_cur+i-cur)/2;
tmp_permu.erase(tmp_permu.begin());
tmp_permu.insert(tmp_permu.begin()+x, permu[i]);
swap(tmp_permu, permu);
cur -= i-x;
}
answer(permu);
}
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... |