race.cpp:9:1: error: 'vector' does not name a type
9 | vector<array<int,2>> g[MAXN];
| ^~~~~~
race.cpp:11:1: error: 'map' does not name a type
11 | map<int,int> m[MAXN];
| ^~~
race.cpp:12:1: error: 'array' does not name a type
12 | array<int,2> o[MAXN];
| ^~~~~
race.cpp: In function 'void dfs(long long int, long long int)':
race.cpp:15:18: error: 'g' was not declared in this scope
15 | for(auto k : g[x]){
| ^
race.cpp:19:22: error: 'g' was not declared in this scope
19 | for(auto [k,w] : g[x]){
| ^
race.cpp:21:9: error: 'o' was not declared in this scope
21 | o[k][0] += w;
| ^
race.cpp:23:12: error: 'm' was not declared in this scope
23 | if(m[k].size() > m[x].size()){
| ^
race.cpp:24:13: error: 'swap' was not declared in this scope
24 | swap(m[k], m[x]);
| ^~~~
race.cpp:24:13: note: suggested alternatives:
In file included from /usr/include/c++/11/regex:63,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:110,
from race.cpp:2:
/usr/include/c++/11/bits/regex.h:2165:5: note: 'std::__cxx11::swap'
2165 | swap(match_results<_Bi_iter, _Alloc>& __lhs,
| ^~~~
In file included from /usr/include/c++/11/bits/stl_pair.h:59,
from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/specfun.h:45,
from /usr/include/c++/11/cmath:1935,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
from race.cpp:2:
/usr/include/c++/11/bits/move.h:196:5: note: 'std::swap'
196 | swap(_Tp& __a, _Tp& __b)
| ^~~~
/usr/include/c++/11/bits/move.h:196:5: note: 'std::swap'
In file included from /usr/include/c++/11/exception:153,
from /usr/include/c++/11/ios:39,
from /usr/include/c++/11/istream:38,
from /usr/include/c++/11/sstream:38,
from /usr/include/c++/11/complex:45,
from /usr/include/c++/11/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
from race.cpp:2:
/usr/include/c++/11/bits/exception_ptr.h:223:5: note: 'std::__exception_ptr::swap'
223 | swap(exception_ptr& __lhs, exception_ptr& __rhs)
| ^~~~
In file included from /usr/include/c++/11/filesystem:45,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:129,
from race.cpp:2:
/usr/include/c++/11/bits/fs_path.h:692:15: note: 'std::filesystem::__cxx11::swap'
692 | inline void swap(path& __lhs, path& __rhs) noexcept { __lhs.swap(__rhs); }
| ^~~~
race.cpp:27:9: error: 'm' was not declared in this scope
27 | m[x][w-o[x][0]] = 1-o[x][1];
| ^
race.cpp:28:13: error: 'pair' was not declared in this scope; did you mean 'std::pair'?
28 | for(pair<int,int> p : m[k]){
| ^~~~
| std::pair
In file included from /usr/include/c++/11/bits/stl_algobase.h:64,
from /usr/include/c++/11/bits/specfun.h:45,
from /usr/include/c++/11/cmath:1935,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
from race.cpp:2:
/usr/include/c++/11/bits/stl_pair.h:211:12: note: 'std::pair' declared here
211 | struct pair
| ^~~~
race.cpp:3:13: error: expected primary-expression before 'long'
3 | #define int long long
| ^~~~
race.cpp:28:18: note: in expansion of macro 'int'
28 | for(pair<int,int> p : m[k]){
| ^~~
race.cpp:35:5: error: expected primary-expression before '}' token
35 | }
| ^
race.cpp:34:10: error: expected ';' before '}' token
34 | }
| ^
| ;
35 | }
| ~
race.cpp:35:5: error: expected primary-expression before '}' token
35 | }
| ^
race.cpp:34:10: error: expected ')' before '}' token
34 | }
| ^
| )
35 | }
| ~
race.cpp:28:12: note: to match this '('
28 | for(pair<int,int> p : m[k]){
| ^
race.cpp:35:5: error: expected primary-expression before '}' token
35 | }
| ^
race.cpp:36:8: error: 'm' was not declared in this scope
36 | if(m[x].find(r-o[x][0])!=m[x].end()) ans = min(ans, m[x][r-o[x][0]] + o[x][1]);
| ^
race.cpp:36:20: error: 'o' was not declared in this scope
36 | if(m[x].find(r-o[x][0])!=m[x].end()) ans = min(ans, m[x][r-o[x][0]] + o[x][1]);
| ^
race.cpp:36:48: error: 'min' was not declared in this scope; did you mean 'std::min'?
36 | if(m[x].find(r-o[x][0])!=m[x].end()) ans = min(ans, m[x][r-o[x][0]] + o[x][1]);
| ^~~
| std::min
In file included from /usr/include/c++/11/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65,
from race.cpp:2:
/usr/include/c++/11/bits/stl_algo.h:3455:5: note: 'std::min' declared here
3455 | min(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
race.cpp: In function 'long long int best_path(long long int, long long int, long long int (*)[2], long long int*)':
race.cpp:45:9: error: 'g' was not declared in this scope
45 | g[i].clear();
| ^
race.cpp:46:9: error: 'm' was not declared in this scope
46 | m[i].clear();
| ^
race.cpp:47:9: error: 'o' was not declared in this scope
47 | o[i] = {0,0};
| ^
race.cpp:51:9: error: 'g' was not declared in this scope
51 | g[x].push_back({y,w});
| ^