# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
722053 | Mr_Husanboy | Art Collections (BOI22_art) | C++17 | 1458 ms | 724 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>
#define all(a) (a).begin(), (a).end()
template<typename T>
int len(T &a){
return a.size();
}
using namespace std;
mt19937 mt(time(NULL));
void solve(int n){
vector<int> v(n);
iota(all(v), 1);
vector<int> memo(n);
for(int i = 0; i < n; i ++){
memo[i] = publish(v);
rotate(v.begin(), v.begin() + 1, v.end());
}
vector<int> ans(n);
for(int i = 0; i < n; i ++){
ans[(memo[i] + n - memo[(i + 1) % n] - 1) / 2] = i + 1;
}
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... |