race.cpp: In function 'int best_path(int, int, int (*)[2], int*)':
race.cpp:2:19: error: 'pair' was not declared in this scope
2 | vector<vector<pair<int, int>>> g(n);
| ^~~~
race.cpp:2:12: error: 'vector' was not declared in this scope
2 | vector<vector<pair<int, int>>> g(n);
| ^~~~~~
race.cpp:2:24: error: expected primary-expression before 'int'
2 | vector<vector<pair<int, int>>> g(n);
| ^~~
race.cpp:5:9: error: 'g' was not declared in this scope
5 | g[e[0]].push_back({e[1], weights[i]});
| ^
race.cpp:8:12: error: expected primary-expression before 'long'
8 | vector<long long> dist(n);
| ^~~~
race.cpp:9:12: error: expected primary-expression before 'int'
9 | vector<int> edge_cnt(n);
| ^~~
race.cpp: In lambda function:
race.cpp:11:34: error: 'g' was not declared in this scope
11 | for (const auto [v, w] : g[u]) {
| ^
race.cpp:15:13: error: 'dist' was not declared in this scope
15 | dist[v] = dist[u] + w;
| ^~~~
race.cpp:16:13: error: 'edge_cnt' was not declared in this scope
16 | edge_cnt[v] = edge_cnt[u] + 1;
| ^~~~~~~~
race.cpp: In function 'int best_path(int, int, int (*)[2], int*)':
race.cpp:21:25: error: 'numeric_limits' was not declared in this scope
21 | constexpr int INF = numeric_limits<int>::max();
| ^~~~~~~~~~~~~~
race.cpp:21:40: error: expected primary-expression before 'int'
21 | constexpr int INF = numeric_limits<int>::max();
| ^~~
race.cpp:23:51: error: 'map' does not name a type
23 | auto dfs2 = [&](auto&& dfs2, int u, int p) -> map<long long, int> {
| ^~~
race.cpp:23:54: error: expected '{' before '<' token
23 | auto dfs2 = [&](auto&& dfs2, int u, int p) -> map<long long, int> {
| ^
race.cpp:23:55: error: expected primary-expression before 'long'
23 | auto dfs2 = [&](auto&& dfs2, int u, int p) -> map<long long, int> {
| ^~~~
race.cpp:11: confused by earlier errors, bailing out