Problem rootedlca
User PlayVoltz
Submission Time 2023-09-27 10:00:10
Score 0
Max Time N/A
Max Memory N/A

Compile Error

rootedlca.cpp:10:20: error: expected initializer before ‘>’ token
10 | vector <pii> ranges>
| ^
rootedlca.cpp: In function ‘void twokdecomp(int, int, int)’:
rootedlca.cpp:15:2: error: ‘depth’ was not declared in this scope; did you mean ‘dep’?
15 | depth[node] = dep;
| ^~~~~
| dep
rootedlca.cpp:24:11: error: request for member ‘first’ in ‘num’, which is of non-class type ‘int’
24 | if (num.first!=par){
| ^~~~~
rootedlca.cpp:25:19: error: request for member ‘first’ in ‘num’, which is of non-class type ‘int’
25 | twokdecomp(num.first, node, dep+1);
| ^~~~~
rootedlca.cpp: In function ‘int lca(int, int)’:
rootedlca.cpp:40:6: error: ‘depth’ was not declared in this scope
40 | if (depth[a]<depth[b]){
| ^~~~~
rootedlca.cpp:43:19: error: ‘depth’ was not declared in this scope
43 | a = kthparent(a, depth[a]-de