# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
677971 | NK_ | Art Collections (BOI22_art) | C++17 | 0 ms | 208 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;
void solve(int N) {
vector<int> A(N); iota(begin(A), end(A), 1);
vector<int> R;
for(int i = 0; i < N; i++) {
rotate(begin(A), begin(A) + 1, end(A));
R.push_back(publish(A));
}
vector<pair<int, int>> P;
for(int i = 0; i < N; i++) {
int dif = R[i] - R[(i+1) % N];
P.push_back(make_pair(dif, i));
}
sort(begin(P), end(P));
vector<int> ans;
for(auto p : P) ans.push_back(p.second);
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... |