traffic.cpp:5:1: error: 'vector' does not name a type
5 | vector<ll > sum;
| ^~~~~~
traffic.cpp:6:1: error: 'vector' does not name a type
6 | vector<ll > ans;
| ^~~~~~
traffic.cpp:7:1: error: 'vector' does not name a type
7 | vector<int> g[1000006];
| ^~~~~~
traffic.cpp:2:12: error: 'int64_t' does not name a type
2 | #define ll int64_t
| ^~~~~~~
traffic.cpp:9:1: note: in expansion of macro 'll'
9 | ll dfs1(int u, int p) {
| ^~
traffic.cpp:2:12: error: 'int64_t' has not been declared
2 | #define ll int64_t
| ^~~~~~~
traffic.cpp:21:25: note: in expansion of macro 'll'
21 | void dfs2(int u, int p, ll psum) {
| ^~
traffic.cpp: In function 'void dfs2(int, int, int)':
traffic.cpp:23:2: error: 'ans' was not declared in this scope
23 | ans[u] = 0;
| ^~~
traffic.cpp:2:12: error: 'int64_t' was not declared in this scope
2 | #define ll int64_t
| ^~~~~~~
traffic.cpp:24:2: note: in expansion of macro 'll'
24 | ll csum = P[u];
| ^~
traffic.cpp:26:12: error: 'max' was not declared in this scope; did you mean 'std::max'?
26 | ans[u] = max(ans[u], psum);
| ^~~
| std::max
In file included from /usr/include/c++/9/vector:60,
from traffic.cpp:1:
/usr/include/c++/9/bits/stl_algobase.h:268:5: note: 'std::max' declared here
268 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
traffic.cpp:27:3: error: 'csum' was not declared in this scope; did you mean 'psum'?
27 | csum += psum;
| ^~~~
| psum
traffic.cpp:29:13: error: 'g' was not declared in this scope
29 | for(int v: g[u]) {
| ^
traffic.cpp:31:4: error: 'csum' was not declared in this scope; did you mean 'psum'?
31 | csum += sum[v];
| ^~~~
| psum
traffic.cpp:31:12: error: 'sum' was not declared in this scope; did you mean 'psum'?
31 | csum += sum[v];
| ^~~
| psum
traffic.cpp:32:13: error: 'max' was not declared in this scope; did you mean 'std::max'?
32 | ans[u] = max(ans[u], sum[v]);
| ^~~
| std::max
In file included from /usr/include/c++/9/vector:60,
from traffic.cpp:1:
/usr/include/c++/9/bits/stl_algobase.h:268:5: note: 'std::max' declared here
268 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
traffic.cpp:35:13: error: 'g' was not declared in this scope
35 | for(int v: g[u]) {
| ^
traffic.cpp:37:15: error: 'csum' was not declared in this scope; did you mean 'psum'?
37 | dfs2(v, u, csum - sum[v]);
| ^~~~
| psum
traffic.cpp:37:22: error: 'sum' was not declared in this scope; did you mean 'psum'?
37 | dfs2(v, u, csum - sum[v]);
| ^~~
| psum
traffic.cpp: In function 'int LocateCentre(int, int*, int*, int*)':
traffic.cpp:44:5: error: 'sum' was not declared in this scope
44 | sum.resize(N);
| ^~~
traffic.cpp:45:5: error: 'ans' was not declared in this scope
45 | ans.resize(N);
| ^~~
traffic.cpp:47:6: error: 'g' was not declared in this scope
47 | g[S[i]].pb(D[i]);
| ^
traffic.cpp:50:5: error: 'dfs1' was not declared in this scope; did you mean 'dfs2'?
50 | dfs1(0, -1);
| ^~~~
| dfs2