MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / preprocess

Function preprocess

Trees/LCA.cpp:44–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44void preprocess(int root) {
45 tin.resize(n);
46 tout.resize(n);
47 timer = 0;
48 l = ceil(log2(n));
49 up.assign(n, vector<int>(l + 1));
50 dfs(root, root);
51}
52
53void solve(){
54 int q;

Callers 1

solveFunction · 0.85

Calls 1

dfsFunction · 0.70

Tested by

no test coverage detected