# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
579605 | wdjpng | Art Collections (BOI22_art) | C++17 | 1456 ms | 752 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 <bits/stdc++.h>
#define int long long
#define rep(i,n) for(int i = 0; i < n; i++)
using namespace std;
void solve(signed n) {
vector<signed> ord(n);
rep(i,n) ord[i]=i+1;
random_shuffle(ord.begin(), ord.end());
int cur = publish(ord);
for(int i = 1; i < n; i++)
{
int tmp = ord[i];
ord.erase(ord.begin()+i);
ord.insert(ord.begin(),tmp);
int newc = publish(ord);
int k = (newc+cur-i)/2;
ord.erase(ord.begin());
ord.insert(ord.begin()+(newc-k),tmp);
cur=k;
}
answer(ord);
}
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... |