# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
677972 | NK_ | Art Collections (BOI22_art) | C++17 | 1540 ms | 756 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++) {
R.push_back(publish(A));
rotate(begin(A), begin(A) + 1, end(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) {
// cout << p.first << " " << p.second << endl;
ans.push_back(p.second + 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... |