Problem | railway |
---|---|
User | yc |
Submission Time | 2025-10-07 16:36:04 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
railway.cpp:7:1: error: ‘dist’ does not name a type
7 | dist[100004];
| ^~~~
railway.cpp:8:1: error: ‘depth’ does not name a type
8 | depth[100004];
| ^~~~~
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:12:3: error: ‘depth’ was not declared in this scope
12 | depth[n1[x][i].first] = depth[x]+1;
| ^~~~~
railway.cpp:13:3: error: ‘dist’ was not declared in this scope
13 | dist[n1[x][i].first] = dist[x]+n1[x][i].second;
| ^~~~
railway.cpp: In function ‘long long int lca(long long int, long long int)’:
railway.cpp:18:6: error: ‘depth’ was not declared in this scope
18 | if (depth[y]>depth[x]) swap(x,y);
| ^~~~~
railway.cpp:20:23: error: ‘depth’ was not declared in this sco