# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
589465 | gromperen | Art Collections (BOI22_art) | C++17 | 1511 ms | 668 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;
#include "art.h"
// g++ -std=c++17 art_sample.cpp sample_grader.cpp
//
void solve(int n) {
vector<int> a(n);
for (int i = 0; i < n; ++i) a[i] = i+1;
vector<int> ans(n+1);
for (int i = 0; i<n; ++i) {
ans[i] = publish(a);
rotate(a.begin(), a.begin()+1, a.end());
}
ans[n] = ans[0];
vector<int> out(n);
for (int i = 0; i < n; ++i) {
int q = ans[i] - ans[i+1] + n-1;
out[q / 2] = i + 1;
}
answer(out);
}
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... |