이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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 time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |