Submission #1117065

#TimeUsernameProblemLanguageResultExecution timeMemory
1117065ortsacRoad Closures (APIO21_roads)C++17
5 / 100
37 ms5560 KiB
#include "roads.h" #include <bits/stdc++.h> using namespace std; #define int long long vector<int> minimum_closure_costs(int32_t n, vector<int32_t> a, vector<int32_t> b, vector<int32_t> w) { vector<int> ans(n); sort(w.begin(), w.end()); int curr = 0; for (int i = 0; i < n; i++) { if (i > 0) curr += (w[i - 1]); ans[i] = curr; } reverse(ans.begin(), ans.end()); 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...