minmaxtree.cpp:2:9: error: 'MAXN' was not declared in this scope
2 | int deg[MAXN];
| ^~~~
minmaxtree.cpp:3:1: error: 'unordered_map' does not name a type
3 | unordered_map<int, int> condense;
| ^~~~~~~~~~~~~
minmaxtree.cpp:4:9: error: 'MAXN' was not declared in this scope
4 | int rev[MAXN];
| ^~~~
minmaxtree.cpp:5:1: error: 'pi' does not name a type
5 | pi merge(pi x, pi y) {
| ^~
minmaxtree.cpp:31:1: error: 'pi' does not name a type
31 | pi root(int n, int p) {
| ^~
minmaxtree.cpp: In function 'int main()':
minmaxtree.cpp:63:5: error: 'cin' was not declared in this scope
63 | cin >> N;
| ^~~
minmaxtree.cpp:64:8: error: 'i' was not declared in this scope
64 | FR(i, N-1) {
| ^
minmaxtree.cpp:64:5: error: 'FR' was not declared in this scope
64 | FR(i, N-1) {
| ^~
minmaxtree.cpp:72:5: error: 'ans' was not declared in this scope
72 | ans[N-1] = -1;
| ^~~
minmaxtree.cpp:92:5: error: 'root' was not declared in this scope
92 | root(0, 0);
| ^~~~
minmaxtree.cpp:93:5: error: 'queue' was not declared in this scope
93 | queue<int> deq;
| ^~~~~
minmaxtree.cpp:93:11: error: expected primary-expression before 'int'
93 | queue<int> deq;
| ^~~
minmaxtree.cpp:94:5: error: 'unordered_set' was not declared in this scope
94 | unordered_set<int> unvis;
| ^~~~~~~~~~~~~
minmaxtree.cpp:94:19: error: expected primary-expression before 'int'
94 | unordered_set<int> unvis;
| ^~~
minmaxtree.cpp:95:25: error: 'condense' was not declared in this scope
95 | for (int i = 0; i < condense.size(); i++) {
| ^~~~~~~~
minmaxtree.cpp:96:9: error: 'deg' was not declared in this scope
96 | deg[i] = color[i].size();
| ^~~
minmaxtree.cpp:96:18: error: 'color' was not declared in this scope
96 | deg[i] = color[i].size();
| ^~~~~
minmaxtree.cpp:98:13: error: 'deq' was not declared in this scope
98 | deq.push(i);
| ^~~
minmaxtree.cpp:101:13: error: 'unvis' was not declared in this scope
101 | unvis.insert(i);
| ^~~~~
minmaxtree.cpp:104:12: error: 'unvis' was not declared in this scope
104 | while (unvis.size() > 0) {
| ^~~~~
minmaxtree.cpp:106:16: error: 'deq' was not declared in this scope
106 | while (deq.size() > 0) {
| ^~~
minmaxtree.cpp:108:26: error: 'color' was not declared in this scope
108 | for (int j : color[next]) {
| ^~~~~
minmaxtree.cpp:109:22: error: 'visited' was not declared in this scope
109 | if (!visited[j]) {
| ^~~~~~~
minmaxtree.cpp:111:30: error: 'rev' was not declared in this scope
111 | ans[j] = rev[next];
| ^~~
minmaxtree.cpp:112:34: error: 'to' was not declared in this scope
112 | for (int e : to[j]) {
| ^~
minmaxtree.cpp:113:25: error: 'deg' was not declared in this scope
113 | deg[e]--;
| ^~~
minmaxtree.cpp:126:13: error: 'deq' was not declared in this scope
126 | deq.push(j);
| ^~~
minmaxtree.cpp:131:17: error: 'to' was not declared in this scope
131 | if (to[i].size() > 0) {
| ^~
minmaxtree.cpp:132:26: error: 'rev' was not declared in this scope
132 | ans[i] = rev[to[i][0]];
| ^~~
minmaxtree.cpp:138:9: error: 'cout' was not declared in this scope
138 | cout << par[i]+1 << " " << i+1 << " " << ans[i] << '\n';
| ^~~~
minmaxtree.cpp:138:17: error: 'par' was not declared in this scope
138 | cout << par[i]+1 << " " << i+1 << " " << ans[i] << '\n';
| ^~~