# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
748088 | vjudge1 | Art Collections (BOI22_art) | C++17 | 1481 ms | 460 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;
using ll =long long;
void solve(int n){
vector<int> a(n);
iota(a.begin(), a.end(), 1);
ll k = publish(a);
if(k==0){
answer(a);
return;
}
if(k==n*(n-1)/2){
reverse(a.begin(), a.end());
answer(a);
return;
}
vector<int> ans(n);
for(int i=0;i<n;i++){
a.push_back(a.front());
a.erase(a.begin(), a.begin()+1);
ll k1=publish(a);
ans[(n-1+k-k1)/2] = i + 1;
k = k1;
}
answer(ans);
return;
}
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... |