# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
678487 | cig32 | Art Collections (BOI22_art) | C++17 | 1818 ms | 624 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"
using namespace std;
void solve(int N) {
std::vector<int> order;
int ans[N+1];
for(int i=1; i<=N; i++) {
order.clear();
for(int j=i; j<=N; j++) order.push_back(j);
for(int j=1; j<i; j++) order.push_back(j);
ans[i] = publish(order);
}
order.clear();
order.resize(N);
for(int i=0; i<N; i++) order[i] = N;
for(int i=1; i<N; i++) {
int vcnt = (ans[i+1] - ans[i] + N - 1) / 2;
order[N-1 - vcnt] = 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... |