race.cpp:7:1: error: 'vector' does not name a type
7 | vector<pair<int, int>> a[N];
| ^~~~~~
race.cpp: In function 'void cntSize(int, int)':
race.cpp:12:30: error: 'a' was not declared in this scope
12 | for (int i = 0; i < (int)a[u].size(); i++)
| ^
race.cpp: In function 'int centroid(int, int, int)':
race.cpp:23:30: error: 'a' was not declared in this scope
23 | for (int i = 0; i < (int)a[u].size(); i++)
| ^
race.cpp: In function 'void cal(int, int, int, int, int)':
race.cpp:35:15: error: 'min' was not declared in this scope; did you mean 'std::min'?
35 | ans = min(ans, h+f[k-dis]);
| ^~~
| std::min
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from race.cpp:2:
/usr/include/c++/10/bits/stl_algo.h:3474:5: note: 'std::min' declared here
3474 | min(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
race.cpp:36:19: error: 'min' was not declared in this scope; did you mean 'std::min'?
36 | else f[dis] = min(f[dis], h);
| ^~~
| std::min
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from race.cpp:2:
/usr/include/c++/10/bits/stl_algo.h:3474:5: note: 'std::min' declared here
3474 | min(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
race.cpp:37:30: error: 'a' was not declared in this scope
37 | for (int i = 0; i < (int)a[u].size(); i++)
| ^
race.cpp:41:20: error: 'w' was not declared in this scope
41 | cal(v, dis+w, mode, u, h+1);
| ^
race.cpp: In function 'void reset(int, int, int)':
race.cpp:49:30: error: 'a' was not declared in this scope
49 | for (int i = 0; i < (int)a[u].size(); i++)
| ^
race.cpp:53:22: error: 'w' was not declared in this scope
53 | reset(v, dis+w, u);
| ^
race.cpp: In function 'void decompose(int)':
race.cpp:63:30: error: 'a' was not declared in this scope
63 | for (int i = 0; i < (int)a[root].size(); i++)
| ^
race.cpp:67:16: error: 'w' was not declared in this scope
67 | cal(v, w, 0);
| ^
race.cpp:71:30: error: 'a' was not declared in this scope
71 | for (int i = 0; i < (int)a[root].size(); i++)
| ^
race.cpp:75:18: error: 'w' was not declared in this scope
75 | reset(v, w);
| ^
race.cpp:78:30: error: 'a' was not declared in this scope
78 | for (int i = 0; i < (int)a[root].size(); i++)
| ^
race.cpp: In function 'int best_path(int, int, int (*)[2], int*)':
race.cpp:87:5: error: 'a' was not declared in this scope
87 | a[H[i][0]].push_back({H[i][1], L[i]});
| ^
race.cpp:94:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
94 | cout << (ans == N ? -1 : ans);
| ^~~~
| std::cout
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:75,
from race.cpp:2:
/usr/include/c++/10/iostream:61:18: note: 'std::cout' declared here
61 | extern ostream cout; /// Linked to standard output
| ^~~~