race.cpp: In function 'void dfs(int, int)':
race.cpp:14:20: error: cannot convert 'std::array<int, 2>' to 'int' in initialization
14 | for(int i : g[v])
| ^
race.cpp: In function 'int fnd(int, int)':
race.cpp:24:20: error: cannot convert 'std::array<int, 2>' to 'int' in initialization
24 | for(int i : g[v])
| ^
race.cpp: In function 'void dist(int, int, int)':
race.cpp:45:23: error: 'x' was not declared in this scope
45 | dist(i[0], v, x[1]);
| ^
race.cpp: In function 'void build(int)':
race.cpp:53:5: error: 'mp' was not declared in this scope; did you mean 'm'?
53 | mp[0] = 0;
| ^~
| m
race.cpp:59:13: error: too few arguments to function 'void dist(int, int, int)'
59 | dist(i, v);
| ~~~~^~~~~~
race.cpp:37:6: note: declared here
37 | void dist(int v, int p, int cst)
| ^~~~
race.cpp: In function 'int best_path(int, int, int (*)[2], int*)':
race.cpp:83:17: error: 'h' was not declared in this scope
83 | int u = h[i][0], v = h[i][1];
| ^
race.cpp:84:21: error: 'v' was not declared in this scope
84 | cin >> u >> v;
| ^
race.cpp:85:28: error: 'l' was not declared in this scope
85 | g[u].push_back({v, l[i]});
| ^
race.cpp:85:23: error: no matching function for call to 'std::vector<std::array<int, 2> >::push_back(<brace-enclosed initializer list>)'
85 | g[u].push_back({v, l[i]});
| ~~~~~~~~~~~~~~^~~~~~~~~~~
In file included from /usr/include/c++/11/vector:67,
from /usr/include/c++/11/functional:62,
from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/11/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65,
from race.cpp:2:
/usr/include/c++/11/bits/stl_vector.h:1187:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::array<int, 2>; _Alloc = std::allocator<std::array<int, 2> >; std::vector<_Tp, _Alloc>::value_type = std::array<int, 2>]'
1187 | push_back(const value_type& __x)
| ^~~~~~~~~
/usr/include/c++/11/bits/stl_vector.h:1187:35: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type&' {aka 'const std::array<int, 2>&'}
1187 | push_back(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/11/bits/stl_vector.h:1203:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = std::array<int, 2>; _Alloc = std::allocator<std::array<int, 2> >; std::vector<_Tp, _Alloc>::value_type = std::array<int, 2>]'
1203 | push_back(value_type&& __x)
| ^~~~~~~~~
/usr/include/c++/11/bits/stl_vector.h:1203:30: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::vector<std::array<int, 2> >::value_type&&' {aka 'std::array<int, 2>&&'}
1203 | push_back(value_type&& __x)
| ~~~~~~~~~~~~~^~~
race.cpp:91:1: warning: no return statement in function returning non-void [-Wreturn-type]
91 | }
| ^