| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1353084 | lukaye_19 | Art Collections (BOI22_art) | C++20 | 0 ms | 0 KiB |
#include <art.h>
#include <bits/stdc++.h>
using namespace std;
vector<int>valid;
/*
vector <int> ans = {1,3,2};
vector <int> pos = {1,3,2};
int cnt=0;
void answer(vector <int> v){
cout<<cnt<<"\n";
if (v==ans){cout<<"YES";}
else{for (auto x : v){cout<<x<<' ';}}
}
int publish(vector <int> v){
cnt++;
int n=v.size();
int sm=0;
for (int i=n-1; i>=1; i--){
for (int j=i-1; j>=0; j--){
if (pos[v[j]-1]>pos[v[i]-1]){sm++;}
}
}
return sm;
}
*/
void solve(int N)
{
vector<int>c = {1,2,3};
while (!valid.size())
{
int size = publish(c);
if (!size) valid = c;
else next_permutation(c.begin(),c.end());
}
answer(valid);
return;
}