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

Method build

code/graph/hld.cpp:31–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29 if (adj[u][i] != parent[u] && adj[u][i] != best)
30 part(curhead = adj[u][i]); }
31 void build(int r = 0) {
32 curloc = 0, csz(curhead = r), part(r); }
33 int lca(int u, int v) {
34 vi uat, vat; int res = -1;
35 while (u != -1) uat.push_back(u), u = parent[head[u]];

Callers 1

testFunction · 0.80

Calls

no outgoing calls

Tested by 1

testFunction · 0.64