Problem railway
User ISAAC
Submission Time 2026-09-26 15:27:42
Score 0
Max Time N/A
Max Memory N/A

Compile Error

railway.cpp: In function ‘long long int lca(long long int, long long int)’:
railway.cpp:20:12: error: ‘a’ was not declared in this scope
20 | if (depth[a]<depth[b]) swap(a,b);
| ^
railway.cpp:20:21: error: ‘b’ was not declared in this scope
20 | if (depth[a]<depth[b]) swap(a,b);
| ^
railway.cpp:22:8: error: ‘a’ was not declared in this scope
22 | if(p[a][k]!=-1 && depth[p[a][k]]>=depth[b]){
| ^
railway.cpp:22:43: error: ‘b’ was not declared in this scope
22 | if(p[a][k]!=-1 && depth[p[a][k]]>=depth[b]){
| ^
railway.cpp:26:5: error: ‘a’ was not declared in this scope
26 | if(a==b)return a;
| ^
railway.cpp:26:8: error: ‘b’ was not declared in this scope
26 | if(a==b)return a;
| ^
railway.cpp:28:8: error: ‘a’ was not declared in this scope
28 | if(p[a][k]!=p[b][k