제출 #1056092

#제출 시각아이디문제언어결과실행 시간메모리
1056092KasymK도로 폐쇄 (APIO21_roads)C++17
5 / 100
27 ms3944 KiB
#include "bits/stdc++.h" using namespace std; #define ff first #define ss second #define all(v) v.begin(), v.end() #define ll long long #define pb push_back #define pii pair<int, int> #define wr puts("----------------") template<class T>bool umin(T& a,T b){if(a>b){a=b;return 1;}return 0;} template<class T>bool umax(T& a,T b){if(a<b){a=b;return 1;}return 0;} const int N = 1e5+5; ll F[N], par[N]; vector<ll> minimum_closure_costs(int n, vector<int> u, vector<int> v, vector<int> w){ sort(all(w)); vector<ll> A; ll sm = accumulate(all(w), 0ll); for(int k = 0; k < n; ++k){ A.pb(sm); sm -= w[n-k-2]; } return A; }
#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...