# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
637048 | GrandTiger1729 | Art Collections (BOI22_art) | C++17 | 1 ms | 208 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 <iostream>
#include <vector>
#include <numeric>
using namespace std;
int publish(vector<int> R);
void answer(vector<int> R);
void solve(int n){
vector<int> ans;
iota(ans.begin(), ans.end(), 1);
int i = 1, cur = publish(ans);
while (cur > 0){
vector<int> tmp(ans);
tmp.erase(tmp.begin() + i);
tmp.insert(tmp.begin(), ans[i]);
int re = publish(tmp);
int x = (re - cur + i) / 2;
ans.erase(ans.begin() + i);
ans.insert(ans.begin() + x, tmp[0]);
}
answer(ans);
}
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... |