traffic.cpp: In function 'void dfs(int, int)':
traffic.cpp:9:16: error: 'adj' was not declared in this scope
9 | for (int u : adj[v]) if (u != _p) {
| ^~~
traffic.cpp:11:5: error: 'sub' was not declared in this scope
11 | sub[v] += sub[u] + p[u];
| ^~~
traffic.cpp: In function 'int LocateCentre(int, int*, int*, int*)':
traffic.cpp:22:5: error: 'adj' was not declared in this scope
22 | adj[S[i]].push_back(D[i]);
| ^~~
traffic.cpp:27:23: error: 'n' was not declared in this scope
27 | for (int i = 1; i < n; i++) {
| ^
traffic.cpp:28:28: error: 'sub' was not declared in this scope
28 | h[i] = max(h[i], tot - sub[i] - p[i]);
| ^~~