제출 #976408

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