# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
577637 | vanic | Art Collections (BOI22_art) | C++17 | 1839 ms | 680 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 "art.h"
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
vector < int > niz;
void solve(int n){
for(int i=1; i<=n; i++){
niz.push_back(i);
}
int tren=publish(niz);
int x;
int y;
int val;
for(int i=1; i<n; i++){
val=niz[i];
niz.erase(niz.begin()+i);
niz.insert(niz.begin(), val);
x=publish(niz);
y=x-tren+i;
y/=2;
niz.erase(niz.begin());
niz.insert(niz.begin()+y, val);
tren=x-y;
}
answer(niz);
}
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... |