This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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... |