# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
915224 | Pikachu | Art Collections (BOI22_art) | C++17 | 1228 ms | 1688 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 <bits/stdc++.h>
using namespace std;
int publish(vector<int>);
void answer(vector<int>);
void solve(int N)
{
vector<int> tmp;
for (int i = 1; i <= N; i++) tmp.push_back(i);
int cur = publish(tmp);
vector<int> ans;
ans.push_back(1);
for (int i = 2; i <= N; i++) {
tmp.clear();
tmp.push_back(i);
tmp.insert(tmp.end(), ans.begin(), ans.end());
for (int j = i + 1; j <= N; j++) tmp.push_back(j);
int ncur = publish(tmp);
int delta = ncur - cur;
int pos = (delta + i - 1) / 2;
ans.insert(ans.begin() + pos, i);
cur = ncur - pos;
}
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... |