# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1093296 | ivaziva | Art Collections (BOI22_art) | C++17 | 1058 ms | 1440 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> vals;
for (int i=1;i<=N;i++)
{
vector<int> vec;
for (int j=i;j<=N;j++) vec.push_back(j);
for (int j=1;j<i;j++) vec.push_back(j);
vals.push_back(publish(vec));
}
vector<pair<int,int>> vec;
for (int i=1;i<N;i++) vec.push_back({vals[i-1]-vals[i],i});
vec.push_back({vals[N-1]-vals[0],N});
sort(vec.begin(),vec.end());
vector<int> ans;
for (int i=0;i<N;i++) ans.push_back(vec[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... |