Problem railway
User yc
Submission Time 2025-10-07 16:36:32
Score 0
Max Time N/A
Max Memory N/A

Compile Error

railway.cpp: In function ‘void dfs(long long int, long long int)’:
railway.cpp:11:23: error: incompatible types in assignment of ‘long long int’ to ‘long long int [20]’
11 | p[n1[x][i].first] = x;
| ^
railway.cpp: In function ‘long long int lca(long long int, long long int)’:
railway.cpp:24:6: error: ‘a’ was not declared in this scope
24 | if (a==b) return a;
| ^
railway.cpp:24:9: error: ‘b’ was not declared in this scope
24 | if (a==b) return a;
| ^
At global scope:
cc1plus: error: ‘::main’ must return ‘int’
railway.cpp: In function ‘int main()’:
railway.cpp:45:10: error: incompatible types in assignment of ‘int’ to ‘long long int [20]’
45 | p[0] = -1;
| ^