Submission #1081117

#TimeUsernameProblemLanguageResultExecution timeMemory
1081117pawnedRoad Closures (APIO21_roads)C++17
5 / 100
43 ms6332 KiB
#pragma GCC optimize("O1,O2,O3,Ofast,unroll-loops") #include <bits/stdc++.h> using namespace std; #define fi first #define se second #define pb push_back typedef long long ll; typedef pair<ll, ll> ii; typedef vector<ll> vi; #include "roads.h" vi minimum_closure_costs(int N, vector<int> U, vector<int> V, vector<int> W) { vi costs; for (ll x : W) costs.pb(x); sort(costs.begin(), costs.end()); vi ans(N, 0); for (int i = N - 2; i >= 0; i--) { ans[i] = ans[i + 1] + costs[N - 2 - 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...