# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
489776 | dung11112003 | 도로 폐쇄 (APIO21_roads) | C++11 | 230 ms | 46492 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "roads.h"
#include <bits/stdc++.h>
using namespace std;
vector <long long> minimum_closure_costs(int N, vector <int> U, vector <int> V, vector <int> W)
{
int n = N;
vector <vector <array <int, 3>>> adj(n);
for (int i = 0; i < n - 1; i++)
{
int u = U[i], v = V[i], w = W[i];
adj[u].push_back({v, w, 0});
adj[v].push_back({u, w, 0});
}
struct FenwickTree
{
//1 - indexed
int n;
vector <int> f;
vector <long long> g;
FenwickTree () : n(0), f(), g() {};
FenwickTree (int n) : n(n), f(n + 1), g(n + 1) {};
void insert(int x, long long d)
{
for (; x <= n; x += x & -x)
{
f[x]++;
g[x] += d;
# | 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... |