MCPcopy Create free account
hub / github.com/ShahjalalShohag/code-library / component_sum

Method component_sum

Data Structures/Link Cut Tree.cpp:171–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169 return ans;
170 }
171 long long component_sum(int u) {
172 return t[find_root(u)].subsum;
173 }
174 long long subtree_sum(int u) {
175 int p = get_parent(u);
176 if (p == 0) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected