Submission #1056145

#TimeUsernameProblemLanguageResultExecution timeMemory
1056145GangstaRoad Closures (APIO21_roads)C++14
5 / 100
27 ms5072 KiB
#include <bits/stdc++.h> #define ll long long int #define pb push_back using namespace std; vector<ll> minimum_closure_costs(int n, vector<int> u, vector<int> v, vector<int> w){ vector <ll> s, ans; ll sum = 0, san = 0; for(auto i: w){ s.pb(i); sum += i; } sort(s.rbegin(), s.rend()); ans.pb(sum); for(auto i: s){ san += i; ans.pb(sum-san); } 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...