# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
720840 | NeroZein | Art Collections (BOI22_art) | C++17 | 1563 ms | 696 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) {
int n = N;
vector<int> ans(n);
deque<int> v(n);
for (int i = 1; i <= n; ++i) {
v[i - 1] = i;
}
vector<int> vv(n);
for (int i = 0; i < n; ++i) {
vv[i] = v[i];
}
int la = publish(vv);
for (int i = 1; i <= n; ++i) {
v.push_back(i);
v.pop_front();
for (int j = 0; j < n; ++j) {
vv[j] = v[j];
}
int New = publish(vv);
int x = (n - 1 + New - la) / 2;
int y = n - 1 - x;
ans[y] = i;
la = New;
}
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... |