race.cpp:17:26: error: 'NM' was not declared in this scope
17 | vector<pair<int, int>> g[NM];
| ^~
race.cpp:18:27: error: 'NM' was not declared in this scope
18 | int n, k, ans = inf, done[NM];
| ^~
race.cpp: In function 'long long int dfs_sz(long long int, long long int)':
race.cpp:22:5: error: 'sz' was not declared in this scope; did you mean 'se'?
22 | sz[u] = 1;
| ^~
| se
race.cpp:23:19: error: 'g' was not declared in this scope
23 | for (auto v : g[u])
| ^
race.cpp:24:27: error: 'done' was not declared in this scope
24 | if (v.fi != p && !done[v.fi])
| ^~~~
race.cpp: In function 'long long int findcen(long long int, long long int, long long int)':
race.cpp:31:19: error: 'g' was not declared in this scope
31 | for (auto v : g[u])
| ^
race.cpp:32:27: error: 'done' was not declared in this scope
32 | if (v.fi != p && !done[v.fi] && 2 * sz[v.fi] >= SZ)
| ^~~~
race.cpp:32:45: error: 'sz' was not declared in this scope; did you mean 'SZ'?
32 | if (v.fi != p && !done[v.fi] && 2 * sz[v.fi] >= SZ)
| ^~
| SZ
race.cpp: In function 'void get(long long int, long long int, long long int, long long int)':
race.cpp:39:9: error: 'mp' was not declared in this scope; did you mean 'p'?
39 | if (mp.count(k - w))
| ^~
| p
race.cpp:41:19: error: 'g' was not declared in this scope
41 | for (auto v : g[u])
| ^
race.cpp:42:27: error: 'done' was not declared in this scope
42 | if (v.fi != p && !done[v.fi])
| ^~~~
race.cpp: In function 'void add(long long int, long long int, long long int, long long int)':
race.cpp:48:12: error: 'mp' was not declared in this scope; did you mean 'p'?
48 | setmin(mp[w], c);
| ^~
race.cpp:10:22: note: in definition of macro 'setmin'
10 | #define setmin(x, y) x = min((x), (y))
| ^
race.cpp:49:19: error: 'g' was not declared in this scope
49 | for (auto v : g[u])
| ^
race.cpp:50:27: error: 'done' was not declared in this scope
50 | if (v.fi != p && !done[v.fi])
| ^~~~
race.cpp: In function 'void cen(long long int)':
race.cpp:56:33: error: too few arguments to function 'long long int dfs_sz(long long int, long long int)'
56 | int c = findcen(u, 0, dfs_sz(u));
| ~~~~~~^~~
race.cpp:20:5: note: declared here
20 | int dfs_sz(int u, int p)
| ^~~~~~
race.cpp:57:5: error: 'mp' was not declared in this scope
57 | mp.clear();
| ^~
race.cpp:59:19: error: 'g' was not declared in this scope
59 | for (auto v : g[u])
| ^
race.cpp:60:14: error: 'done' was not declared in this scope
60 | if (!done[v.fi])
| ^~~~
race.cpp:65:5: error: 'done' was not declared in this scope
65 | done[u] = 1;
| ^~~~
race.cpp:66:19: error: 'g' was not declared in this scope
66 | for (auto v : g[u])
| ^
race.cpp: In function 'long long int best_path(long long int, long long int, long long int (*)[2], long long int*)':
race.cpp:76:9: error: 'g' was not declared in this scope
76 | g[H[i][0]].emplace_back(H[i][1], L[i]);
| ^