Submission #570239

#TimeUsernameProblemLanguageResultExecution timeMemory
570239ChrisM2309Road Closures (APIO21_roads)C++14
0 / 100
43 ms3732 KiB
#include "roads.h" #include <bits/stdc++.h> using namespace std; typedef pair<int,int> ii; typedef long long ll; typedef vector<int> vi; typedef vector<ll> vll; typedef vector<vi> vvi; typedef vector<ii> vii; typedef vector<vii> wgraf; typedef pair<int,ii> edge; #define UNVISITED 0 #define VISITED 1 #define INF 1000000000 #define pb push_back #define F first #define S second #define all(x) (x).begin(), (x).end() std::vector<long long> minimum_closure_costs(int N, std::vector<int> U, std::vector<int> V, std::vector<int> W) { vector<ll> ans; sort(all(W),greater<ll>()); ll sum = 0; for (auto i : W){ sum += i; ans.pb(sum); } reverse(all(ans)); ans.pb(0); 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...