Problem lunchbox
User Hi1057
Submission Time 2025-12-29 01:17:51
Score 0
Max Time N/A
Max Memory N/A

Compile Error

In file included from /usr/include/c++/9/algorithm:62,
from lunchbox.cpp:4:
/usr/include/c++/9/bits/stl_algo.h: In instantiation of ‘void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = std::_List_iterator<long long int>; _Compare = __gnu_cxx::__ops::_Iter_less_iter]’:
/usr/include/c++/9/bits/stl_algo.h:4873:18: required from ‘void std::sort(_RAIter, _RAIter) [with _RAIter = std::_List_iterator<long long int>]’
lunchbox.cpp:16:35: required from here
/usr/include/c++/9/bits/stl_algo.h:1974:22: error: no match for ‘operator-’ (operand types are ‘std::_List_iterator<long long int>’ and ‘std::_List_iterator<long long int>’)
1974 | 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