# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
713224 | gun_gan | Art Collections (BOI22_art) | C++17 | 0 ms | 0 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>
using namespace std;
void solve(int n) {
vector<int> ans(n);
for(int i = 1; i <= n; i++) {
vector<int> v;
for(int j = 1; j <= n; j++) {
if(i != j) v.push_back(j);
}
v.push_back(i);
int x = publish(v);
v.clear();
v.push_back(i);
for(int j = 1; j <= n; j++) {
if(i != j) v.push_back(j);
}
int y = publish(v);
ans[n - (x - y + n - 1) / 2 - 1] = i;
}
answer(ans);
}