Submission #984424

#TimeUsernameProblemLanguageResultExecution timeMemory
984424MarcusRoad Closures (APIO21_roads)C++17
5 / 100
46 ms5564 KiB
#include "roads.h" #include <vector> #include <bits/stdc++.h> using namespace std; #define ll long long std::vector<long long> minimum_closure_costs(int N, std::vector<int> U, std::vector<int> V, std::vector<int> W) { vector<ll> presum(N); sort(W.begin(), W.end()); for (int i=0; i<N-1; i++) {presum[i+1] = presum[i] + W[i];} reverse(presum.begin(), presum.end()); return presum; }
#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...