# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
573553 | NintsiChkhaidze | Art Collections (BOI22_art) | C++17 | 1688 ms | 628 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 pb push_back
using namespace std;
int st[4005],en[4005];
void solve(int N) {
vector <int> order,v; v.clear();
for (int i=1;i<=N;i++) order.pb(i),v.pb(i);
for (int i = 1; i <= N; i++){
int r = publish(v);
st[v[0]] = r,en[v.back()] = r;
v.pb(v[0]);
v.erase(v.begin());
}
for (int i = 1; i <= N; i++){
int id = (N + 1 + st[i] - en[i])/2;
order[id-1] = i;
}
answer(order);
}
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... |