# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
924561 | mdobric | 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;
int red[4005], red_in[4005];
vector <int> r;
void answer (vector <int> v);/*{
for (int i = 0; i < v.size(); i++){
cout << v[i] << " ";
}
cout << "\n";
return;
}*/
int publish (vector <int> v);/*{
cout << "? ";
for (int i = 0; i < v.size(); i++){
cout << v[i] << " ";
}
cout << endl;
int ans;
cin >> ans;
return ans;
}*/
void solve (int n){
for (int i = 1; i <= n; i++){
for (int j = 1; j <= n; j++){
if (j != i){
r.push_back(j);
}
}
r.push_back(i);
int x = publish(r);
r.clear();
r.push_back(i);
for (int j = 1; j <= n; j++){
if (j != i){
r.push_back(j);
}
}
int y = publish(r);
r.clear();
red[i] = (n - 1 - x + y) / 2;
red[i]++;
red_in[red[i]] = i;
}
for (int i = 1; i <= n; i++){
r.push_back(red_in[i]);
}
answer(r);
}
int main (void){
return 0;
}