race.cpp: In function 'void c(int, int, int)':
race.cpp:13:14: error: invalid types 'int[int]' for array subscript
dp2[l][r][a]=1+dp3[r][(l+d+n)%n][a^1];
^
race.cpp:15:27: error: invalid types 'int[int]' for array subscript
dp1[l][r][a]=dp2[l][r][a]=-n;
^
race.cpp:18:14: error: invalid types 'int[int]' for array subscript
dp2[l][r][a]=max(dp1[l][k][a]+dp2[k][r][a], dp1[l][r][a]);
^
race.cpp:18:44: error: invalid types 'int[int]' for array subscript
dp2[l][r][a]=max(dp1[l][k][a]+dp2[k][r][a], dp1[l][r][a]);
^
race.cpp:20:19: error: 'dp' was not declared in this scope
dp3[l][r][a]=max(dp[l][r][a][1], dp3[l][(r-d+n)%n][a]);
^~
race.cpp:20:19: note: suggested alternative: 'd'
dp3[l][r][a]=max(dp[l][r][a][1], dp3[l][(r-d+n)%n][a]);
^~
d
race.cpp: In function 'int main()':
race.cpp:44:26: error: invalid types 'int[int]' for array subscript
ans=max({{dp2[i][j][k], i}, ans});
^
race.cpp:44:37: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
ans=max({{dp2[i][j][k], i}, ans});
^
In file included from /usr/include/c++/7/bits/char_traits.h:39:0,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from race.cpp:1:
/usr/include/c++/7/bits/stl_algobase.h:219:5: note: candidate: template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)
max(const _Tp& __a, const _Tp& __b)
^~~
/usr/include/c++/7/bits/stl_algobase.h:219:5: note: template argument deduction/substitution failed:
race.cpp:44:37: note: candidate expects 2 arguments, 1 provided
ans=max({{dp2[i][j][k], i}, ans});
^
In file included from /usr/include/c++/7/bits/char_traits.h:39:0,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from race.cpp:1:
/usr/include/c++/7/bits/stl_algobase.h:265:5: note: candidate: template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^~~
/usr/include/c++/7/bits/stl_algobase.h:265:5: note: template argument deduction/substitution failed:
race.cpp:44:37: note: candidate expects 3 arguments, 1 provided
ans=max({{dp2[i][j][k], i}, ans});
^
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:65,
from race.cpp:1:
/usr/include/c++/7/bits/stl_algo.h:3462:5: note: candidate: constexpr _Tp std::max(std::initializer_list<_Tp>) [with _Tp = std::array<int, 2>]
max(initializer_list<_Tp> __l)
^~~
/usr/include/c++/7/bits/stl_algo.h:3462:5: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::initializer_list<std::array<int, 2> >'
/usr/include/c++/7/bits/stl_algo.h:3468:5: note: candidate: template<class _Tp, class _Compare> constexpr _Tp std::max(std::initializer_list<_Tp>, _Compare)
max(initializer_list<_Tp> __l, _Compare __comp)
^~~
/usr/include/c++/7/bits/stl_algo.h:3468:5: note: template argument deduction/substitution failed:
race.cpp:44:37: note: candidate expects 2 arguments, 1 provided
ans=max({{dp2[i][j][k], i}, ans});
^