semiexpress.cpp: In function 'int main()':
semiexpress.cpp:115:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
115 | for (int i = 0; i < vec.size(); i++) {
| ~~^~~~~~~~~~~~
semiexpress.cpp:117:42: warning: comparison of integer expressions of different signedness: 'std::set<long long int>::size_type' {aka 'long unsigned int'} and 'll' {aka 'long long int'} [-Wsign-compare]
117 | while (addt.size() != 0 && addt.size() > k) {
| ~~~~~~~~~~~~^~~
semiexpress.cpp:123:10: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
123 | if (i < vec.size() - 1 && lastInd >= vec[i + 1]) break;
| ~~^~~~~~~~~~~~~~~~
semiexpress.cpp:143:10: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
143 | if (i < vec.size() - 1 && l >= vec[i + 1]) {
| ~~^~~~~~~~~~~~~~~~
semiexpress.cpp:164:20: warning: comparison of integer expressions of different signedness: 'int' and 'const long long unsigned int' [-Wsign-compare]
164 | for (int i = 0; i < min(ull(addt.size()), ull(k)); i++) {
| ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/9/algorithm:62,
from semiexpress.cpp:4:
/usr/include/c++/9/bits/stl_algo.h: In instantiation of 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = std::reverse_iterator<std::_Rb_tree_const_iterator<long long int> >; _Compare = __gnu_cxx::__ops::_Iter_less_iter]':
/usr/include/c++/9/bits/stl_algo.h:4867:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = std::reverse_iterator<std::_Rb_tree_const_iterator<long long int> >]'
semiexpress.cpp:162:33: required from here
/usr/include/c++/9/bits/stl_algo.h:1968:22: error: no match for 'operator-' (operand types are 'std::reverse_iterator<std::_Rb_tree_const_iterator<long long int> >' and 'std::reverse_iterator<std::_Rb_tree_const_iterator<long long int> >')
1968 | std::__lg(__last - __first) * 2,
| ~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from semiexpress.cpp:1:
/usr/include/c++/9/bits/stl_iterator.h:276:7: note: candidate: 'constexpr std::reverse_iterator<_Iterator> std::reverse_iterator<_Iterator>::operator-(std::reverse_iterator<_Iterator>::difference_type) const [with _Iterator = std::_Rb_tree_const_iterator<long long int>; std::reverse_iterator<_Iterator>::difference_type = long int]'
276 | operator-(difference_type __n) const
| ^~~~~~~~
/usr/include/c++/9/bits/stl_iterator.h:276:33: note: no known conversion for argument 1 from 'std::reverse_iterator<std::_Rb_tree_const_iterator<long long int> >' to 'std::reverse_iterator<std::_Rb_tree_const_iterator<long long int> >::difference_type' {aka 'long int'}
276 | operator-(difference_type __n) const
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/9/bits/stl_iterator.h:415:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)'
415 | operator-(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/9/bits/stl_iterator.h:415:5: note: template argument deduction/substitution failed:
/usr/include/c++/9/bits/stl_iterator.h: In substitution of 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&) [with _IteratorL = std::_Rb_tree_const_iterator<long long int>; _IteratorR = std::_Rb_tree_const_iterator<long long int>]':
/usr/include/c++/9/bits/stl_algo.h:1968:22: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = std::reverse_iterator<std::_Rb_tree_const_iterator<long long int> >; _Compare = __gnu_cxx::__ops::_Iter_less_iter]'
/usr/include/c++/9/bits/stl_algo.h:4867:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = std::reverse_iterator<std::_Rb_tree_const_iterator<long long int> >]'
semiexpress.cpp:162:33: required from here
/usr/include/c++/9/bits/stl_iterator.h:417:28: error: no match for 'operator-' (operand types are 'std::reverse_iterator<std::_Rb_tree_const_iterator<long long int> >::iterator_type' {aka 'std::_Rb_tree_const_iterator<long long int>'} and 'std::reverse_iterator<std::_Rb_tree_const_iterator<long long int> >::iterator_type' {aka 'std::_Rb_tree_const_iterator<long long int>'})
417 | -> decltype(__y.base() - __x.base())
/usr/include/c++/9/bits/stl_iterator.h:415:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)'
415 | operator-(const reverse_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/9/bits/stl_iterator.h:415:5: note: template argument deduction/substitution failed:
/usr/include/c++/9/bits/stl_iterator.h:417:28: note: 'std::reverse_iterator<std::_Rb_tree_const_iterator<long long int> >::iterator_type' {aka 'std::_Rb_tree_const_iterator<long long int>'} is not derived from 'const std::reverse_iterator<_Iterator>'
417 | -> decltype(__y.base() - __x.base())
/usr/include/c++/9/bits/stl_iterator.h:1212:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__x.base() - __y.base())) std::operator-(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorR>&)'
1212 | operator-(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/9/bits/stl_iterator.h:1212:5: note: template argument deduction/substitution failed:
/usr/include/c++/9/bits/stl_iterator.h:417:28: note: 'std::reverse_iterator<std::_Rb_tree_const_iterator<long long int> >::iterator_type' {aka 'std::_Rb_tree_const_iterator<long long int>'} is not derived from 'const std::move_iterator<_IteratorL>'
417 | -> decltype(__y.base() - __x.base())
In file included from /usr/include/c++/9/vector:68,
from semiexpress.cpp:2:
/usr/include/c++/9/bits/stl_bvector.h:214:3: note: candidate: 'std::ptrdiff_t std::operator-(const std::_Bit_iterator_base&, const std::_Bit_iterator_base&)'
214 | operator-(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y)
| ^~~~~~~~
/usr/include/c++/9/bits/stl_bvector.h:214:39: note: no known conversion for argument 1 from 'std::reverse_iterator<std::_Rb_tree_const_iterator<long long int> >::iterator_type' {aka 'std::_Rb_tree_const_iterator<long long int>'} to 'const std::_Bit_iterator_base&'
214 | operator-(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/9/deque:67,
from /usr/include/c++/9/queue:60,
from semiexpress.cpp:7:
/usr/include/c++/9/bits/stl_deque.h:370:5: note: candidate: 'template<class _Tp, class _Ref, class _Ptr> typename std::_Deque_iterator<_Tp, _Ref, _Ptr>::difference_type std::operator-(const std::_Deque_iterator<_Tp, _Ref, _Ptr>&, const std::_Deque_iterator<_Tp, _Ref, _Ptr>&)'
370 | operator-(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
| ^~~~~~~~
/usr/include/c++/9/bits/stl_deque.h:370:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from semiexpress.cpp:1:
/usr/include/c++/9/bits/stl_iterator.h:417:28: note: 'std::reverse_iterator<std::_Rb_tree_const_iterator<long long int> >::iterator_type' {aka 'std::_Rb_tree_const_iterator<long long int>'} is not derived from 'const std::_Deque_iterator<_Tp, _Ref, _Ptr>'
417 | -> decltype(__y.base() - __x.base())
In file included from /usr/include/c++/9/deque:67,
from /usr/include/c++/9/queue:60,
from semiexpress.cpp:7:
/usr/include/c++/9/bits/stl_deque.h:382:5: note: candidate: 'template<class _Tp, class _RefL, class _PtrL, class _RefR, class _PtrR> typename std::_Deque_iterator<_Tp, _Ref, _Ptr>::difference_type std::operator-(const std::_Deque_iterator<_Tp, _Ref, _Ptr>&, const std::_Deque_iterator<_Tp, _RefR, _PtrR>&)'
382 | operator-(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
| ^~~~~~~~
/usr/include/c++/9/bits/stl_deque.h:382:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/ostream:38,
from /usr/include/c++/9/iostream:39,
from semiexpress.cpp:1:
/usr/include/c++/9/bits/stl_iterator.h:417:28: note: 'std::reverse_iterator<std::_Rb_tree_const_iterator<long long int> >::iterator_type' {aka 'std::_Rb_tree_const_iterator<long long int>'} is not derived from 'const std::_Deque_iterator<_Tp, _Ref, _Ptr>'
417 | -> decltype(__y.base() - __x.base())
/usr/include/c++/9/bits/stl_algo.h: In instantiation of 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = std::reverse_iterator<std::_Rb_tree_const_iterator<long long int> >; _Compare = __gnu_cxx::__ops::_Iter_less_iter]':
/usr/include/c++/9/bits/stl_algo.h:4867:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = std::reverse_iterator<std::_Rb_tree_const_iterator<long long int> >]'
semiexpress.cpp:162:33: required from here
/usr/include/c++/9/bits/stl_iterator.h:1212:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__x.base() - __y.base())) std::operator-(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorR>&)'
1212 | operator-(const move_iterator<_IteratorL>& __x,
| ^~~~~~~~
/usr/include/c++/9/bits/stl_iterator.h:1212:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/9/algorithm:62,
from semiexpress.cpp:4:
/usr/include/c++/9/bits/stl_algo.h:1968:22: note: 'std::reverse_iterator<std::_Rb_tree_const_iterator<long long int> >' is not derived from 'const std::move_iterator<_IteratorL>'
1968 | std::__lg(__last - __first) * 2,
| ~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/9/vector:68,
from semiexpress.cpp:2:
/usr/include/c++/9/bits/stl_bvector.h:214:3: note: candidate: 'std::ptrdiff_t std::operator-(const std::_Bit_iterator_base&, const std::_Bit_iterator_base&)'
214 | operator-(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y)
| ^~~~~~~~
/usr/include/c++/9/bits/stl_bvector.h:214:39: note: no known conversion for argument 1 from 'std::reverse_iterator<std::_Rb_tree_const_iterator<long long int> >' to 'const std::_Bit_iterator_base&'
214 | operator-(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/9/deque:67,
from /usr/include/c++/9/queue:60,
from semiexpress.cpp:7:
/usr/include/c++/9/bits/stl_deque.h:370:5: note: candidate: 'template<class _Tp, class _Ref, class _Ptr> typename std::_Deque_iterator<_Tp, _Ref, _Ptr>::difference_type std::operator-(const std::_Deque_iterator<_Tp, _Ref, _Ptr>&, const std::_Deque_iterator<_Tp, _Ref, _Ptr>&)'
370 | operator-(const _Deque_iterator<_Tp, _Ref, _Ptr>& __x,
| ^~~~~~~~
/usr/include/c++/9/bits/stl_deque.h:370:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/9/algorithm:62,
from semiexpress.cpp:4:
/usr/include/c++/9/bits/stl_algo.h:1968:22: note: 'std::reverse_iterator<std::_Rb_tree_const_iterator<long long int> >' is not derived from 'const std::_Deque_iterator<_Tp, _Ref, _Ptr>'
1968 | std::__lg(__last - __first) * 2,
| ~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/9/deque:67,
from /usr/include/c++/9/queue:60,
from semiexpress.cpp:7:
/usr/include/c++/9/bits/stl_deque.h:382:5: note: candidate: 'template<class _Tp, class _RefL, class _PtrL, class _RefR, class _PtrR> typename std::_Deque_iterator<_Tp, _Ref, _Ptr>::difference_type std::operator-(const std::_Deque_iterator<_Tp, _Ref, _Ptr>&, const std::_Deque_iterator<_Tp, _RefR, _PtrR>&)'
382 | operator-(const _Deque_iterator<_Tp, _RefL, _PtrL>& __x,
| ^~~~~~~~
/usr/include/c++/9/bits/stl_deque.h:382:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/9/algorithm:62,
from semiexpress.cpp:4:
/usr/include/c++/9/bits/stl_algo.h:1968:22: note: 'std::reverse_iterator<std::_Rb_tree_const_iterator<long long int> >' is not derived from 'const std::_Deque_iterator<_Tp, _Ref, _Ptr>'
1968 | std::__lg(__last - __first) * 2,
| ~~~~~~~^~~~~~~~~