# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
963563 | aeg | Art Collections (BOI22_art) | C++17 | 564 ms | 1304 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> def(N);
iota(def.begin(), def.end(), 1);
int defval = publish(def);
vector<int> ans = def;
stable_sort(ans.begin(), ans.end(), [&](int a, int b){
def[a-1] = b;
def[b-1] = a;
int curval = publish(def);
def[a-1] = a;
def[b-1] = b;
if(defval < curval) {
if(a > b) {
return false;
}
else {
return true;
}
}
else {
if(a > b) {
return true;
}
else {
return false;
}
}
});
answer(ans);
}
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... |