MCPcopy Create free account
hub / github.com/SuprDewd/CompetitiveProgramming / HLD

Method HLD

code/graph/hld.cpp:8–10  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6 vi sz, head, parent, loc;
7 vvi adj; segment_tree values;
8 HLD(int _n) : n(_n), sz(n, 1), head(n),
9 parent(n, -1), loc(n), adj(n) {
10 vector<ll> tmp(n, ID); values = segment_tree(tmp); }
11 void add_edge(int u, int v) {
12 adj[u].push_back(v); adj[v].push_back(u); }
13 void update_cost(int u, int v, int c) {

Callers

nothing calls this directly

Calls 1

segment_treeClass · 0.85

Tested by

no test coverage detected