incursion.cpp:19:15: error: 'NM' was not declared in this scope
19 | vector<int> g[NM], ans;
| ^~
incursion.cpp: In function 'long long int dfs(long long int, long long int)':
incursion.cpp:24:18: error: 'g' was not declared in this scope
24 | for (int v : g[u])
| ^
incursion.cpp: In function 'std::vector<long long int> mark(std::vector<std::pair<long long int, long long int> >, long long int)':
incursion.cpp:38:9: error: 'g' was not declared in this scope
38 | g[t.fi].push_back(t.se), g[t.se].push_back(t.fi);
| ^
incursion.cpp: At global scope:
incursion.cpp:44:8: error: 'NM' was not declared in this scope
44 | int sz[NM], dep[NM];
| ^~
incursion.cpp:44:17: error: 'NM' was not declared in this scope
44 | int sz[NM], dep[NM];
| ^~
incursion.cpp: In function 'long long int dfs_sz(long long int, long long int)':
incursion.cpp:48:5: error: 'sz' was not declared in this scope; did you mean 'se'?
48 | sz[u] = 1;
| ^~
| se
incursion.cpp:49:18: error: 'g' was not declared in this scope
49 | for (int v : g[u])
| ^
incursion.cpp:52:13: error: 'dep' was not declared in this scope; did you mean 'dup'?
52 | dep[v] = dep[u] + 1;
| ^~~
| dup
incursion.cpp: In function 'long long int SZ(long long int, long long int)':
incursion.cpp:60:12: error: 'dep' was not declared in this scope; did you mean 'dup'?
60 | return dep[u] < dep[v] ? sz[v] : n - sz[u];
| ^~~
| dup
incursion.cpp:60:30: error: 'sz' was not declared in this scope; did you mean 'SZ'?
60 | return dep[u] < dep[v] ? sz[v] : n - sz[u];
| ^~
| SZ
incursion.cpp: In function 'void locate(std::vector<std::pair<long long int, long long int> >, long long int, long long int)':
incursion.cpp:67:9: error: 'g' was not declared in this scope
67 | g[t.fi].push_back(t.se), g[t.se].push_back(t.fi);
| ^
incursion.cpp:70:18: error: 'g' was not declared in this scope
70 | sort(all(g[i]), [&](int x, int y){return SZ(i, x) < SZ(i, y);});
| ^
incursion.cpp:13:16: note: in definition of macro 'all'
13 | #define all(x) x.begin(), x.end()
| ^
incursion.cpp:73:9: error: 'vis' was not declared in this scope
73 | vis[curr] = 1;
| ^~~
incursion.cpp:74:13: error: 'g' was not declared in this scope
74 | if (g[curr].empty())
| ^
incursion.cpp:77:30: error: 'g' was not declared in this scope
77 | t = visit(curr = g[curr].back());
| ^
incursion.cpp:81:26: error: 'g' was not declared in this scope
81 | for (int x : g[curr])
| ^