# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
689732 | bdl | Art Collections (BOI22_art) | C++17 | 1903 ms | 588 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.
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include "art.h"
#include <algorithm>
#include <vector>
using namespace std;
void solve(int n) {
vector<int> p(n);
for (int i = 0; i < n; i++)
p[i] = i + 1;
vector<int> k(n);
for (int i = 0; i < n; i++) {
k[i] = publish(p);
rotate(p.begin(), p.begin() + 1, p.end());
}
for (int i = 0; i < n; i++)
p[(k[i] - k[(i + 1) % n] + n - 1) / 2] = i + 1;
answer(p);
}
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... |