# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
925075 | codefox | Art Collections (BOI22_art) | C++17 | 1169 ms | 1600 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;
void solve(int N) {
vector<int> order(N);
iota(order.begin(), order.end(), 1);
vector<int> sol(N, -1);
int begin = publish(order);
int last = begin;
for (int i = 1; i < N; i++)
{
for (int j = 0; j < N-1; j++)
{
order[j] = order[j+1];
}
order[N-1] = i;
int next = publish(order);
int diff = next-last;
sol[(N-1-diff)/2] = i;
last = next;
}
int diff = begin-last;
sol[(N-1-diff)/2] = N;
answer(sol);
}
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... |