# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
651885 | Specialistas13 | Art Collections (BOI22_art) | C++17 | 1623 ms | 728 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) {
vector<int> order;
int poz[5000];
bool taken[5000];
int x, y, o, z, bad=0;
for (int i=1; i<=N; i++){
order.push_back(i);
poz[i]=0;
taken[i]=false;
}
x=publish(order);
for (int i=1; i<=N-1; i++){
order.clear();
for (int j=i+1; j<=N; j++){
order.push_back(j);
}
for (int j=1; j<=i; j++){
order.push_back(j);
}
y=publish(order);
o=(y-x-N)/(-2);
//z=N-o;
poz[o+1]=i;
taken[o+1]=true;
x=y;
}
for (int i=1; i<=N; i++){
if (!taken[i]){
poz[i]=N;
break;
}
}
order.clear();
for (int i=1; i<=N; i++){
order.push_back(poz[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... |