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:4:9: error: 'g' was not declared in this scope
4 | g[H[i][0]].push_back({H[i][1], L[i]});
| ^
race.cpp:8:18: error: 'INT_MAX' was not declared in this scope
8 | int answer = INT_MAX;
| ^~~~~~~
race.cpp:1:1: note: 'INT_MAX' is defined in header '<climits>'; did you forget to '#include <climits>'?
+++ |+#include <climits>
1 | int best_path(int N, int K, int H[][2], int L[]) {
race.cpp:10:5: error: 'function' was not declared in this scope; did you mean 'union'?
10 | function<void(int,int,int,int)> dfs = [&](int v,int p,int length,int edges){
| ^~~~~~~~
| union
race.cpp:10:34: error: expression list treated as compound expression in functional cast [-fpermissive]
10 | function<void(int,int,int,int)> dfs = [&](int v,int p,int length,int edges){
| ^
race.cpp:10:14: error: expected primary-expression before 'void'
10 | function<void(int,int,int,int)> dfs = [&](int v,int p,int length,int edges){
| ^~~~
race.cpp:24:9: error: 'dfs' was not declared in this scope
24 | dfs(i,-1,0,0);
| ^~~