# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
574210 | Jasiekstrz | Art Collections (BOI22_art) | C++17 | 1564 ms | 800 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"
#define fi first
#define se second
using namespace std;
vector<int> t;
vector<int> r;
vector<pair<int,int>> srt;
void solve(int N)
{
for(int i=1;i<=N;i++)
t.push_back(i);
for(int i=1;i<=N;i++)
{
r.push_back(publish(t));
t.erase(t.begin());
t.push_back(i);
}
r.push_back(r[0]);
for(int i=1;i<=N;i++)
{
int w=r[i-1]-r[i];
w=(w+N+1)/2;
srt.emplace_back(w,i);
}
sort(srt.begin(),srt.end());
t.clear();
for(auto [a,b]:srt)
t.push_back(b);
answer(t);
return;
}
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... |