| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1360993 | Jawad_Akbar_JJ | Road Closures (APIO21_roads) | C++17 | 21 ms | 4656 KiB |
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
vector<long long> sub1(int n, vector<int> U, vector<int> V, vector<int> W){
sort(rbegin(W), rend(W));
vector<long long> Ans(n, 0);
for (int i : W)
Ans[0] += i;
for (int i=1;i<=W.size();i++)
Ans[i] = Ans[i-1] - W[i-1];
return Ans;
}
vector<long long> minimum_closure_costs(int n, vector<int> U, vector<int> V, vector<int> W){
bool t = 1;
for (int i=0;i<n-1;i++)
t &= U[i] == 0;
if (t)
return sub1(n, U, V, W);
// return sub2(n, U, V, W);
}Compilation message (stderr)
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
