# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1050239 | KarolZ | Art Collections (BOI22_art) | C++17 | 948 ms | 1844 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<iostream>
#include "art.h"
#include<vector>
using namespace std;
void solve(int n){
vector<int>v;
for(int i=1;i<=n;i++)v.push_back(i);
int ost=publish(v),akt;
for(int i=2;i<=n;i++){
for(int j=i-1;j>0;j--)swap(v[j],v[j-1]);
akt=publish(v);
for(int j=0;j<(i-1+akt-ost)/2;j++)swap(v[j],v[j+1]);
ost=akt-(i-1+akt-ost)/2;
}
answer(v);
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... |