# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
598063 | jhnah917 | Art Collections (BOI22_art) | C++17 | 1547 ms | 656 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.
#ifndef LOCAL
#include "art.h"
#endif
#include <bits/stdc++.h>
using namespace std;
void solve(int n){
vector<int> cost(n+1);
for(int i=1; i<=n; i++){
vector<int> now;
for(int j=1; j<=n; j++) if(i != j) now.push_back(j);
now.insert(now.begin(), i);
int t1 = publish(now);
now.erase(now.begin());
now.push_back(i);
int t2 = publish(now);
now.pop_back();
cost[i] = t1 - t2;
}
vector<int> res(n);
iota(res.begin(), res.end(), 1);
sort(res.begin(), res.end(), [&](int a, int b){ return cost[a] < cost[b]; });
answer(res);
}
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... |