Submission #569474

#TimeUsernameProblemLanguageResultExecution timeMemory
569474TurkhuuRoad Closures (APIO21_roads)C++17
5 / 100
47 ms3636 KiB
#include "roads.h" #include <bits/stdc++.h> std::vector<long long> minimum_closure_costs(int n, std::vector<int> u, std::vector<int> v, std::vector<int> w){ sort(w.begin(), w.end()); std::vector<long long> ans(n); for(int i = 0; i < n - 1; i++){ ans[n - i - 2] = ans[n - i - 1] + w[i]; } return ans; }
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...