# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
714964 | study | Art Collections (BOI22_art) | C++17 | 1603 ms | 740 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;
const int N = 4e3;
long long a[N];
void solve(int n){
vector<int> res(n);
deque<int> q;
for (int i=1; i<=n; ++i){
q.emplace_back(i);
}
for (int i=0; i<n; ++i){
a[i] = publish({q.begin(),q.end()});
q.emplace_back(q.front());
q.pop_front();
}
for (int i=0; i<n; ++i){
res[(a[i]-a[(i+1)%n]+n-1)/2] = i+1;
}
answer(res);
}
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... |