# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
602939 | DanerZein | Art Collections (BOI22_art) | C++17 | 33 ms | 208 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 "art.h"
#include <bits/stdc++.h>
using namespace std;
void solve(int N) {
vector<int> ord;
for(int i=1;i<=N;i++) ord.push_back(i);
while(true){
for(int i=0;i<N;i++){
int mi=publish(ord);
int id=-1;
for(int j=i+1;j<N;j++){
swap(ord[i],ord[j]);
int rp=publish(ord);
if(rp<mi){
mi=rp;
id=j;
}
if(!rp){
answer(ord);
return;
}
swap(ord[i],ord[j]);
}
if(id!=-1){
swap(ord[i],ord[id]);
}
}
}
//answer(ord);
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |