Problem | ancestor |
---|---|
User | Sealions |
Submission Time | 2022-12-29 10:35:58 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
ancestor.cpp: In function ‘int Ica(int, int)’:
ancestor.cpp:5:5: error: ‘depth’ was not declared in this scope
5 | if (depth[a]<depth[b]) swap(a, b); // a has greater depth for (int k=19; k>=0; K--)
| ^~~~~
ancestor.cpp:6:5: error: ‘p’ was not declared in this scope
6 | if (p[a][k]!=-1 && depth [p[a][k]]>=depth[b])
| ^
ancestor.cpp:6:10: error: ‘k’ was not declared in this scope
6 | if (p[a][k]!=-1 && depth [p[a][k]]>=depth[b])
| ^
ancestor.cpp:6:20: error: ‘depth’ was not declared in this scope
6 | if (p[a][k]!=-1 && depth [p[a][k]]>=depth[b])
| ^~~~~
ancestor.cpp:9:5: error: ‘p’ was not declared in this scope
9 | if (p[a][k]!=p[b][k]) a=p[a][k], b=p[b][k];
| ^
ancestor.cpp:9:10: error: ‘k’ was not declared in this scope
9 | if (p[a][k]!=p[b][k]) a=p[a][k], b=p[b][k];
| ^
ancestor.cpp:10:8: error: ‘p’ was n