제출 #626964

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