Main.cpp:8:12: error: 'maxn' was not declared in this scope
8 | int n,fuel[maxn];
| ^~~~
Main.cpp:9:29: error: 'maxn' was not declared in this scope
9 | vector <pair <int,int>> adj[maxn];
| ^~~~
Main.cpp:12:8: error: 'maxn' was not declared in this scope
12 | int sz[maxn];
| ^~~~
Main.cpp:13:10: error: 'maxn' was not declared in this scope
13 | bool del[maxn];
| ^~~~
Main.cpp: In function 'int countChild(int, int)':
Main.cpp:16:9: error: 'sz' was not declared in this scope
16 | sz[node] = 1;
| ^~
Main.cpp:17:22: error: 'adj' was not declared in this scope
17 | for (int x : adj[node]) if (x.first != par && !del[x.first]) {
| ^~~
Main.cpp:17:39: error: request for member 'first' in 'x', which is of non-class type 'int'
17 | for (int x : adj[node]) if (x.first != par && !del[x.first]) {
| ^~~~~
Main.cpp:17:56: error: 'del' was not declared in this scope
17 | for (int x : adj[node]) if (x.first != par && !del[x.first]) {
| ^~~
Main.cpp:17:62: error: request for member 'first' in 'x', which is of non-class type 'int'
17 | for (int x : adj[node]) if (x.first != par && !del[x.first]) {
| ^~~~~
Main.cpp:18:42: error: request for member 'first' in 'x', which is of non-class type 'int'
18 | sz[node] += countChild(x.first,node);
| ^~~~~
Main.cpp: In function 'int findCentroid(int, int, int)':
Main.cpp:24:22: error: 'adj' was not declared in this scope
24 | for (int x : adj[node]) if (x.first != par && !del[x.first] && sz[x.first] > n / 2) {
| ^~~
Main.cpp:24:39: error: request for member 'first' in 'x', which is of non-class type 'int'
24 | for (int x : adj[node]) if (x.first != par && !del[x.first] && sz[x.first] > n / 2) {
| ^~~~~
Main.cpp:24:56: error: 'del' was not declared in this scope
24 | for (int x : adj[node]) if (x.first != par && !del[x.first] && sz[x.first] > n / 2) {
| ^~~
Main.cpp:24:62: error: request for member 'first' in 'x', which is of non-class type 'int'
24 | for (int x : adj[node]) if (x.first != par && !del[x.first] && sz[x.first] > n / 2) {
| ^~~~~
Main.cpp:24:72: error: 'sz' was not declared in this scope
24 | for (int x : adj[node]) if (x.first != par && !del[x.first] && sz[x.first] > n / 2) {
| ^~
Main.cpp:24:77: error: request for member 'first' in 'x', which is of non-class type 'int'
24 | for (int x : adj[node]) if (x.first != par && !del[x.first] && sz[x.first] > n / 2) {
| ^~~~~
Main.cpp:25:39: error: request for member 'first' in 'x', which is of non-class type 'int'
25 | return findCentroid(x.first,node,n);
| ^~~~~
Main.cpp: At global scope:
Main.cpp:31:30: error: 'maxn' was not declared in this scope
31 | vector <pair <ll,bool>> cont[maxn];
| ^~~~
Main.cpp: In function 'void solve(int)':
Main.cpp:35:22: error: 'adj' was not declared in this scope
35 | for (int x : adj[node]) if (!del[x.first]) {
| ^~~
Main.cpp:35:38: error: 'del' was not declared in this scope
35 | for (int x : adj[node]) if (!del[x.first]) {
| ^~~
Main.cpp:35:44: error: request for member 'first' in 'x', which is of non-class type 'int'
35 | for (int x : adj[node]) if (!del[x.first]) {
| ^~~~~
Main.cpp:36:31: error: request for member 'first' in 'x', which is of non-class type 'int'
36 | int child = x.first,w = x.second;
| ^~~~~
Main.cpp:38:21: error: 'fuel' was not declared in this scope
38 | if (fuel[child] >= w) cont[child].push_back({fuel[child] - w + fuel[node]});
| ^~~~
Main.cpp:38:36: error: 'w' was not declared in this scope
38 | if (fuel[child] >= w) cont[child].push_back({fuel[child] - w + fuel[node]});
| ^
Main.cpp:38:39: error: 'cont' was not declared in this scope; did you mean 'const'?
38 | if (fuel[child] >= w) cont[child].push_back({fuel[child] - w + fuel[node]});
| ^~~~
| const
Main.cpp: At global scope:
Main.cpp:43:6: error: redefinition of 'void solve(int)'
43 | void solve(int node) {
| ^~~~~
Main.cpp:33:6: note: 'void solve(int)' previously defined here
33 | void solve(int node) {
| ^~~~~
Main.cpp: In function 'void solve(int)':
Main.cpp:49:9: error: 'del' was not declared in this scope
49 | del[ct] = 1;
| ^~~
Main.cpp:50:22: error: 'adj' was not declared in this scope
50 | for (int x : adj[node]) if (!del[x.first]) solve(x.first);
| ^~~
Main.cpp:50:44: error: request for member 'first' in 'x', which is of non-class type 'int'
50 | for (int x : adj[node]) if (!del[x.first]) solve(x.first);
| ^~~~~
Main.cpp:50:60: error: request for member 'first' in 'x', which is of non-class type 'int'
50 | for (int x : adj[node]) if (!del[x.first]) solve(x.first);
| ^~~~~
Main.cpp: In function 'int main()':
Main.cpp:61:43: error: 'fuel' was not declared in this scope
61 | for (int i = 1;i <= n;i++) cin >> fuel[i];
| ^~~~
Main.cpp:64:17: error: 'adj' was not declared in this scope
64 | adj[u].push_back({v,w});
| ^~~