제출 #1117065

#제출 시각아이디문제언어결과실행 시간메모리
1117065ortsac도로 폐쇄 (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...