# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1007279 | devariaota | 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;
#define pb push_back
#define endl '\n'
#define all(v) v.begin(), v.end()
#define fr(m,n,k) for(int m=n;m<=k;m++)
int n;
void solve(int N) {
n = N;
std::vector<int> v; fr(i, 1, n) v.pb(i);
x = publish(v);
if (x == 0) {
answer(v); return;
}
while (next_permutation(all(v))) {
x = publish(v);
if (x == 0) {
answer(v); return;
}
}
}