fish.cpp: In function 'long long int max_weights(int, int, std::vector<int>, std::vector<int>, std::vector<int>)':
fish.cpp:32:20: error: 'p' was not declared in this scope
32 | for(int j=0; j<p; j++){
| ^
fish.cpp:35:19: error: 'nxt' was not declared in this scope
35 | while(nxt.f<fish[i+1].size() && fish[i+1][nxt.f].f+1<=y){
| ^~~
fish.cpp:39:19: error: 'prv' was not declared in this scope
39 | while(prv.f<fish[i-1].size() && fish[i-1][prv.f].f+1<=y){
| ^~~
fish.cpp:44:38: error: 'sum' was not declared in this scope
44 | dp[i][j]=max(dp1[i-1][k]-sum, prv.s+inc[i-1][k-1]);
| ^~~
fish.cpp:44:43: error: 'prv' was not declared in this scope
44 | dp[i][j]=max(dp1[i-1][k]-sum, prv.s+inc[i-1][k-1]);
| ^~~
fish.cpp:49:75: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
49 | dp[i][j]=max({dp[i][j], dp1[i-2][k2], dp[i-2][k2-1]+prv.s});
| ^
In file included from /usr/include/c++/10/bits/specfun.h:45,
from /usr/include/c++/10/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from fish.cpp:1:
/usr/include/c++/10/bits/stl_algobase.h:254:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
254 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:254:5: note: template argument deduction/substitution failed:
fish.cpp:49:75: note: candidate expects 2 arguments, 1 provided
49 | dp[i][j]=max({dp[i][j], dp1[i-2][k2], dp[i-2][k2-1]+prv.s});
| ^
In file included from /usr/include/c++/10/bits/specfun.h:45,
from /usr/include/c++/10/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from fish.cpp:1:
/usr/include/c++/10/bits/stl_algobase.h:300:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
300 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:300:5: note: template argument deduction/substitution failed:
fish.cpp:49:75: note: candidate expects 3 arguments, 1 provided
49 | dp[i][j]=max({dp[i][j], dp1[i-2][k2], dp[i-2][k2-1]+prv.s});
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from fish.cpp:1:
/usr/include/c++/10/bits/stl_algo.h:3480:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(std::initializer_list<_Tp>)'
3480 | max(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3480:5: note: template argument deduction/substitution failed:
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(std::initializer_list<_Tp>, _Compare)'
3486 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: template argument deduction/substitution failed:
fish.cpp:57:32: error: 'nxt' was not declared in this scope
57 | dp1[i][j]=dp[i][j]+nxt.s;
| ^~~
fish.cpp:60:5: warning: no return statement in function returning non-void [-Wreturn-type]
60 | }
| ^
fish.cpp: At global scope:
fish.cpp:62:9: error: expected unqualified-id before 'for'
62 | for(int j=p-1; j>=0; j--){
| ^~~
fish.cpp:62:24: error: 'j' does not name a type
62 | for(int j=p-1; j>=0; j--){
| ^
fish.cpp:62:30: error: 'j' does not name a type
62 | for(int j=p-1; j>=0; j--){
| ^
fish.cpp:65:5: error: expected declaration before '}' token
65 | }
| ^
fish.cpp:67:5: error: expected unqualified-id before 'return'
67 | return dp1[n][0];
| ^~~~~~
fish.cpp:68:1: error: expected declaration before '}' token
68 | }
| ^