Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/SuprDewd/CompetitiveProgramming
/ query
Method
query
code/graph/hld.cpp:47–48 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
45
u = parent[head[u]];
46
return f(res, values.query(loc[v] + 1, loc[u]).x); }
47
int query(int u, int v) { int l = lca(u, v);
48
return f(query_upto(u, l), query_upto(v, l)); } };
49
// vim: cc=60 ts=2 sts=2 sw=2:
Callers
3
query_upto
Method · 0.45
lca
Method · 0.45
test
Function · 0.45
Calls
2
lca
Function · 0.85
f
Function · 0.85
Tested by
2
lca
Method · 0.36
test
Function · 0.36