# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
598064 | jhnah917 | Art Collections (BOI22_art) | C++17 | 1468 ms | 712 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.
#ifndef LOCAL
#include "art.h"
#endif
#include <bits/stdc++.h>
using namespace std;
void solve(int n){
vector<int> cost(n+1);
vector<int> v(n);
iota(v.begin(), v.end(), 1);
for(int i=1; i<=n; i++){
cost[i] = publish(v);
rotate(v.begin(), v.begin()+1, v.end());
}
vector<int> res(n);
iota(res.begin(), res.end(), 1);
sort(res.begin(), res.end(), [&](int a, int b){ return cost[a] - cost[a%n+1] < cost[b] - cost[b%n+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... |