제출 #965085

#제출 시각아이디문제언어결과실행 시간메모리
965085Pannda즐거운 행로 (APIO20_fun)C++17
26 / 100
125 ms23900 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...