제출 #964675

#제출 시각아이디문제언어결과실행 시간메모리
964675kilkuwu도로 폐쇄 (APIO21_roads)C++17
5 / 100
46 ms5564 KiB
#include "roads.h" #include <bits/stdc++.h> std::vector<long long> minimum_closure_costs(int N, std::vector<int> U, std::vector<int> V, std::vector<int> W) { std::vector<long long> res(N); std::sort(W.begin(), W.end()); long long ans = 0; for (int i = N - 1; i > 0; i--) { int j = N - i - 1; res[i] = ans; ans += W[j]; } res[0] = ans; return res; }
#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...