# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
602991 | DanerZein | Art Collections (BOI22_art) | C++17 | 125 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);
int mi=publish(ord);
for(int i=1;i<N;i++){
int id=1e9;
vector<int> rp=ord;
for(int j=i-1;j>=0;j--){
swap(rp[j+1],rp[j]);
int qu=publish(rp);
if(qu<mi){
id=j;
mi=qu;
}
}
for(int j=i-1;j>=id;j--){
swap(ord[j+1],ord[j]);
}
}
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... |