Submission #981744

#TimeUsernameProblemLanguageResultExecution timeMemory
981744IUA_HasinRoad Closures (APIO21_roads)C++17
5 / 100
39 ms3948 KiB
#include "roads.h" #include <bits/stdc++.h> #define ll long long using namespace std; 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<ll> ans; ll temp = 0; ans.push_back(0); for(int i=0; i<N-1; i++){ temp = temp+W[i]; ans.push_back(temp); } sort(ans.rbegin(), ans.rend()); 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...