제출 #824550

#제출 시각아이디문제언어결과실행 시간메모리
824550Hanksburger도로 폐쇄 (APIO21_roads)C++17
5 / 100
41 ms8068 KiB
#include "roads.h" #include <bits/stdc++.h> using namespace std; vector<long long> u, v, w; vector<long long> minimum_closure_costs(int nn, vector<int> uu, vector<int> vv, vector<int> ww) { long long n=nn; for (long long i=0; i<n-1; i++) u.push_back(uu[i]), v.push_back(vv[i]), w.push_back(ww[i]); sort(w.begin(), w.end()); for (long long i=1; i<n-1; i++) w[i]+=w[i-1]; reverse(w.begin(), w.end()); w.push_back(0); return w; }
#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...