molecules.cpp: In function 'std::vector<int> find_subset(int, int, std::vector<int>)':
molecules.cpp:14:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
14 | for(int i = 0; i < w.size(); i++){
| ~~^~~~~~~~~~
molecules.cpp:21:29: error: no match for 'operator>' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::pair<long long int, int> >, std::pair<long long int, int> >::value_type' {aka 'std::pair<long long int, int>'} and 'int')
21 | if(tot_sum < l || new_w[0] > u)
In file included from /usr/include/c++/9/bits/stl_algobase.h:64,
from /usr/include/c++/9/vector:60,
from molecules.h:3,
from molecules.cpp:1:
/usr/include/c++/9/bits/stl_pair.h:467:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator>(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)'
467 | operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
| ^~~~~~~~
/usr/include/c++/9/bits/stl_pair.h:467:5: note: template argument deduction/substitution failed:
molecules.cpp:21:31: note: mismatched types 'const std::pair<_T1, _T2>' and 'int'
21 | if(tot_sum < l || new_w[0] > u)
| ^
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
from /usr/include/c++/9/vector:60,
from molecules.h:3,
from molecules.cpp:1:
/usr/include/c++/9/bits/stl_iterator.h:343:5: note: candidate: 'template<class _Iterator> bool std::operator>(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)'
343 | operator>(const reverse_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/9/bits/stl_iterator.h:343:5: note: template argument deduction/substitution failed:
molecules.cpp:21:31: note: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<long long int, int> >, std::pair<long long int, int> >::value_type' {aka 'std::pair<long long int, int>'} is not derived from 'const std::reverse_iterator<_Iterator>'
21 | if(tot_sum < l || new_w[0] > u)
| ^
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
from /usr/include/c++/9/vector:60,
from molecules.h:3,
from molecules.cpp:1:
/usr/include/c++/9/bits/stl_iterator.h:381:5: note: candidate: 'template<class _IteratorL, class _IteratorR> bool std::operator>(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)'
381 | operator>(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/9/bits/stl_iterator.h:381:5: note: template argument deduction/substitution failed:
molecules.cpp:21:31: note: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<long long int, int> >, std::pair<long long int, int> >::value_type' {aka 'std::pair<long long int, int>'} is not derived from 'const std::reverse_iterator<_Iterator>'
21 | if(tot_sum < l || new_w[0] > u)
| ^
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
from /usr/include/c++/9/vector:60,
from molecules.h:3,
from molecules.cpp:1:
/usr/include/c++/9/bits/stl_iterator.h:1187:5: note: candidate: 'template<class _IteratorL, class _IteratorR> bool std::operator>(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorR>&)'
1187 | operator>(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/9/bits/stl_iterator.h:1187:5: note: template argument deduction/substitution failed:
molecules.cpp:21:31: note: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<long long int, int> >, std::pair<long long int, int> >::value_type' {aka 'std::pair<long long int, int>'} is not derived from 'const std::move_iterator<_IteratorL>'
21 | if(tot_sum < l || new_w[0] > u)
| ^
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
from /usr/include/c++/9/vector:60,
from molecules.h:3,
from molecules.cpp:1:
/usr/include/c++/9/bits/stl_iterator.h:1193:5: note: candidate: 'template<class _Iterator> bool std::operator>(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorL>&)'
1193 | operator>(const move_iterator<_Iterator>& __x,
| ^~~~~~~~
/usr/include/c++/9/bits/stl_iterator.h:1193:5: note: template argument deduction/substitution failed:
molecules.cpp:21:31: note: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<long long int, int> >, std::pair<long long int, int> >::value_type' {aka 'std::pair<long long int, int>'} is not derived from 'const std::move_iterator<_IteratorL>'
21 | if(tot_sum < l || new_w[0] > u)
| ^
In file included from /usr/include/c++/9/vector:67,
from molecules.h:3,
from molecules.cpp:1:
/usr/include/c++/9/bits/stl_vector.h:1918:5: note: candidate: 'template<class _Tp, class _Alloc> bool std::operator>(const std::vector<_Tp, _Alloc>&, const std::vector<_Tp, _Alloc>&)'
1918 | operator>(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
| ^~~~~~~~
/usr/include/c++/9/bits/stl_vector.h:1918:5: note: template argument deduction/substitution failed:
molecules.cpp:21:31: note: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<long long int, int> >, std::pair<long long int, int> >::value_type' {aka 'std::pair<long long int, int>'} is not derived from 'const std::vector<_Tp, _Alloc>'
21 | if(tot_sum < l || new_w[0] > u)
| ^
molecules.cpp:27:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<long long int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
27 | for(int i = 0; i < new_w.size(); i++){
| ~~^~~~~~~~~~~~~~
molecules.cpp:29:45: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<long long int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
29 | while(tot_sum_idx <= i || (tot_sum_idx < new_w.size() && tot_sum+currsum > u)){
| ~~~~~~~~~~~~^~~~~~~~~~~~~~
molecules.cpp:38:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<long long int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
38 | for(int x = tot_sum_idx; x < new_w.size(); x++)
| ~~^~~~~~~~~~~~~~