traffic.cpp:6:1: error: 'vector' does not name a type
6 | vector<int> adj[1000000];
| ^~~~~~
traffic.cpp: In function 'void dfs1(long long int, long long int)':
traffic.cpp:14:15: error: 'adj' was not declared in this scope
14 | for (int v : adj[u])
| ^~~
traffic.cpp: In function 'void dfs2(long long int, long long int)':
traffic.cpp:23:15: error: 'adj' was not declared in this scope
23 | for (int v : adj[u])
| ^~~
traffic.cpp:25:13: error: 'max' was not declared in this scope; did you mean 'std::max'?
25 | ans[u] = max(ans[u], tot_peo[v]);
| ^~~
| std::max
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from traffic.cpp:1:
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: 'std::max' declared here
3486 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
traffic.cpp:28:12: error: 'max' was not declared in this scope; did you mean 'std::max'?
28 | ans[u] = max(ans[u], tot_peo[0] - tot_peo[u]);
| ^~~
| std::max
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from traffic.cpp:1:
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: 'std::max' declared here
3486 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
traffic.cpp:30:15: error: 'adj' was not declared in this scope
30 | for (int v : adj[u])
| ^~~
traffic.cpp: In function 'long long int LocateCentre(long long int, long long int*, long long int*, long long int*)':
traffic.cpp:37:3: error: 'adj' was not declared in this scope
37 | adj[S[i]].push_back(D[i]);
| ^~~
traffic.cpp:49:8: error: 'min' was not declared in this scope; did you mean 'std::min'?
49 | mn = min(mn, ans[i]);
| ^~~
| std::min
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from traffic.cpp:1:
/usr/include/c++/10/bits/stl_algo.h:3474:5: note: 'std::min' declared here
3474 | min(initializer_list<_Tp> __l, _Compare __comp)
| ^~~