# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
721571 | Erkinoff_Mohammed | Art Collections (BOI22_art) | C++17 | 1681 ms | 920 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;
#define INF 2000000000
#define INFLL 3000000000000000000LL
#define ll long long
void solve(int N){
vector<int>R(N);
set<int>free_pos;
for(int i=1;i<=N;i++){
R[i-1]=i;
free_pos.insert(i-1);
}
vector<int>out(N);
int prev=publish(R);
for(int i=1;i<N;i++){
R.erase(R.begin());
R.push_back(i);
int cur=publish(R);
int qw=(cur+prev-N+1)/2;
out[prev-qw]=i;
free_pos.erase(prev-qw);
prev=cur;
}
out[*(free_pos.begin())]=N;
answer(out);
}
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... |