fish.cpp: In function 'void printWeight(int, int)':
fish.cpp:17:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
17 | for (int j = 0; j < weight[i].size(); ++j) {
| ~~^~~~~~~~~~~~~~~~~~
fish.cpp: In function 'void printDp(int, int)':
fish.cpp:28:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
28 | for (int j = 0; j < dp_left[i].size(); ++j) {
| ~~^~~~~~~~~~~~~~~~~~~
fish.cpp:36:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
36 | for (int j = 0; j < dp_right[i].size(); ++j) {
| ~~^~~~~~~~~~~~~~~~~~~~
fish.cpp: In function 'long long int max_weights(int, int, std::vector<int>, std::vector<int>, std::vector<int>)':
fish.cpp:77:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
77 | for (int j = 1; j < weight[i].size(); ++j) {
| ~~^~~~~~~~~~~~~~~~~~
fish.cpp:82:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
82 | for (int j = 0; j < weight[i].size(); ++j) {
| ~~^~~~~~~~~~~~~~~~~~
fish.cpp:93:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
93 | for (int j = 0; j < dp_left[i].size(); ++j) {
| ~~^~~~~~~~~~~~~~~~~~~
fish.cpp:94:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
94 | for (int k = 0; k < dp_left[i - 1].size() && i > 0; ++k) {
| ~~^~~~~~~~~~~~~~~~~~~~~~~
fish.cpp:106:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
106 | for (int j = 0; j < dp_right[i].size(); ++j) {
| ~~^~~~~~~~~~~~~~~~~~~~
fish.cpp:107:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
107 | for (int k = 0; k < dp_right[i + 1].size() && i < n - 1; ++k) {
| ~~^~~~~~~~~~~~~~~~~~~~~~~~
fish.cpp:120:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
120 | for (int j = 0; j < dp_left[i].size(); ++j) {
| ~~^~~~~~~~~~~~~~~~~~~
fish.cpp:121:83: error: no matching function for call to 'max(long int, long long int&)'
121 | result = std::max(dp_left[i][j].second + dp_right[i][j].second, result);
| ^
In file included from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
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:121:83: note: deduced conflicting types for parameter 'const _Tp' ('long int' and 'long long int')
121 | result = std::max(dp_left[i][j].second + dp_right[i][j].second, result);
| ^
In file included from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/ostream:38,
from /usr/include/c++/10/iostream:39,
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:121:83: note: deduced conflicting types for parameter 'const _Tp' ('long int' and 'long long int')
121 | result = std::max(dp_left[i][j].second + dp_right[i][j].second, result);
| ^
In file included from /usr/include/c++/10/algorithm:62,
from fish.cpp:4:
/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:
fish.cpp:121:83: note: mismatched types 'std::initializer_list<_Tp>' and 'long int'
121 | result = std::max(dp_left[i][j].second + dp_right[i][j].second, result);
| ^
In file included from /usr/include/c++/10/algorithm:62,
from fish.cpp:4:
/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:121:83: note: mismatched types 'std::initializer_list<_Tp>' and 'long int'
121 | result = std::max(dp_left[i][j].second + dp_right[i][j].second, result);
| ^
fish.cpp: In function 'int main()':
fish.cpp:139:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
139 | for (int j = 1; j < weight[i].size(); ++j) {
| ~~^~~~~~~~~~~~~~~~~~
fish.cpp:147:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
147 | for (int j = 0; j < weight[i].size(); ++j) {
| ~~^~~~~~~~~~~~~~~~~~
fish.cpp:158:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
158 | for (int j = 0; j < dp_left[i].size(); ++j) {
| ~~^~~~~~~~~~~~~~~~~~~
fish.cpp:159:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
159 | for (int k = 0; k < dp_left[i - 1].size() && i > 0; ++k) {
| ~~^~~~~~~~~~~~~~~~~~~~~~~
fish.cpp:171:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
171 | for (int j = 0; j < dp_right[i].size(); ++j) {
| ~~^~~~~~~~~~~~~~~~~~~~
fish.cpp:172:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
172 | for (int k = 0; k < dp_right[i + 1].size() && i < n - 1; ++k) {
| ~~^~~~~~~~~~~~~~~~~~~~~~~~
fish.cpp:187:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
187 | for (int j = 0; j < dp_left[i].size(); ++j) {
| ~~^~~~~~~~~~~~~~~~~~~