race.cpp: In lambda function:
race.cpp:13:18: error: invalid types 'int[int]' for array subscript
13 | if (p[i] != j) {
| ^
race.cpp:14:29: error: no match for call to '(std::function<std::vector<int>(int)>) (std::tuple_element<0, std::pair<int, int> >::type&, int&, std::tuple_element<1, std::pair<int, int> >::type&)'
14 | auto x = dfs(j, i, wtf);
| ~~~^~~~~~~~~~~
In file included from /usr/include/c++/11/functional:59,
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:1:
/usr/include/c++/11/bits/std_function.h:586:7: note: candidate: '_Res std::function<_Res(_ArgTypes ...)>::operator()(_ArgTypes ...) const [with _Res = std::vector<int>; _ArgTypes = {int}]'
586 | operator()(_ArgTypes... __args) const
| ^~~~~~~~
/usr/include/c++/11/bits/std_function.h:586:7: note: candidate expects 1 argument, 3 provided
race.cpp:24:26: error: 'wtf' was not declared in this scope
24 | for (int y = k - wtf; y >= 0; --y) dp[y + wtf] = dp[y];
| ^~~
race.cpp: In function 'int best_path(int, int, int (*)[2], int*)':
race.cpp:27:5: error: conversion from 'best_path(int, int, int (*)[2], int*)::<lambda(int, int, int)>' to non-scalar type 'std::function<std::vector<int>(int)>' requested
27 | };
| ^
race.cpp:28:8: error: no match for call to '(std::function<std::vector<int>(int)>) (int, int, int)'
28 | dfs(0, 0, 0);
| ~~~^~~~~~~~~
In file included from /usr/include/c++/11/functional:59,
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:1:
/usr/include/c++/11/bits/std_function.h:586:7: note: candidate: '_Res std::function<_Res(_ArgTypes ...)>::operator()(_ArgTypes ...) const [with _Res = std::vector<int>; _ArgTypes = {int}]'
586 | operator()(_ArgTypes... __args) const
| ^~~~~~~~
/usr/include/c++/11/bits/std_function.h:586:7: note: candidate expects 1 argument, 3 provided