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 "fun.h"
#include <bits/stdc++.h>
using namespace std;
vector<int> createFunTour(int n, int _400000) {
auto findFurthest = [&](int u, set<int> dom) {
int v = u;
int dv = 0;
for (int x : dom) {
int dx = hoursRequired(u, x);
if (dx > dv) {
v = x;
dv = dx;
}
}
return v;
};
set<int> rem;
for (int u = 0; u < n; u++) rem.insert(u);
int u = findFurthest(0, rem);
vector<int> res;
for (int i = 0; i < n; i++) {
res.push_back(u);
rem.erase(u);
u = findFurthest(u, rem);
}
return res;
}
# | 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... |