traffic.cpp:10:1: error: 'vector' does not name a type
10 | vector<int> g[N];
| ^~~~~~
traffic.cpp: In function 'void dfs(int, int)':
traffic.cpp:15:18: error: 'g' was not declared in this scope
15 | for(auto to: g[v]){
| ^
traffic.cpp:18:14: error: 'max' was not declared in this scope; did you mean 'std::max'?
18 | mx = max(mx, sub[to]);
| ^~~
| std::max
In file included from /usr/include/c++/9/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from traffic.cpp:1:
/usr/include/c++/9/bits/stl_algo.h:3462:5: note: 'std::max' declared here
3462 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
traffic.cpp:21:10: error: 'max' was not declared in this scope; did you mean 'std::max'?
21 | mx = max(mx, total - curSum);
| ^~~
| std::max
In file included from /usr/include/c++/9/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from traffic.cpp:1:
/usr/include/c++/9/bits/stl_algo.h:3462:5: note: 'std::max' declared here
3462 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
traffic.cpp: In function 'int LocateCentre(int, int*, int*, int*)':
traffic.cpp:33:13: error: 'g' was not declared in this scope
33 | g[s[i]].push_back(d[i]);
| ^