# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
576558 | InternetPerson10 | Art Collections (BOI22_art) | C++17 | 1759 ms | 672 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;
vector<int> tot, ord, ans;
void solve(int N) {
tot.resize(N+1);
ord.resize(N);
ans.resize(N);
for(int i = 0; i < N; i++) {
vector<int> v;
for(int j = i; j < i+N; j++) {
v.push_back((j%N) + 1);
}
tot[i] = publish(v);
vector<int>().swap(v);
}
tot[N] = tot[0];
for(int i = 0; i < N; i++) {
ord[i] = N - 1 - (tot[i] - tot[i+1] + N - 1)/2;
}
for(int i = 0; i < N; i++) {
ans[ord[i]] = i + 1;
}
reverse(ans.begin(), ans.end());
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... |