# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1120412 | vjudge1 | 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>
#include "art.h"
using namespace std;
void publish(vector <int> v) {
cout << "publish({";
for(auto to : v) {
cout << to << ",";
}
cout << "})\n";
}
void answer(vector <int> v) {
cout << "answer({";
for(auto to : v) {
cout << to << ",";
}
cout << "})";
}
void solve(int n) {
cin >> n;
vector <int> v, v2;
for(int i = 1; i <= n; i++) {
v.push_back(i);
}
v2 = v;
reverse(v2.begin(), v2.end());
while(1) {
int res = -1;
res = publish(v);
if(res == 0) {
answer(v);
return;
}
next_permutation(v.begin(), v.end());
}
}