# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1007490 | kukuk | Art Collections (BOI22_art) | C++17 | 721 ms | 1612 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;
vector<int> dq;
vector<pair<int,int>> v;
void solve(int N){
for(int i = 1; i <= N; i++){
dq.push_back(i);
}
int cyc[2010];
for(int i = 0; i < N; i++){
int val = publish(dq);
cyc[i] = val;
dq.push_back(*dq.begin());
dq.erase(dq.begin());
}
cyc[N] = cyc[0];
for(int i = 0; i < N; i++){
v.push_back({cyc[i+1]-cyc[i], i+1});
}
sort(v.begin(), v.end());
vector<int> ans(N);
for(int i = 0; i < N; i++){
ans[N-(i+1)] = v[i].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... |