# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
653512 | AlperenT | Art Collections (BOI22_art) | C++17 | 1656 ms | 792 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>
#include "art.h"
using namespace std;
void solve(int n) {
vector<int> vec(n), ans(n, -1);
iota(vec.begin(), vec.end(), 1);
int prv, cur;
prv = publish(vec);
for(int i = 0; i < n - 1; i++){
vec.push_back(vec.front());
vec.erase(vec.begin());
cur = publish(vec);
ans[n - 1 - ((cur - prv + (n - 1)) / 2)] = vec.back();
prv = cur;
}
for(int i = 0; i < n; i++) if(ans[i] == -1) ans[i] = vec.front();
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... |