Problem rollercoaster
User ForgottenDragon
Submission Time 2025-06-20 16:31:55
Score 0
Max Time N/A
Max Memory N/A

Compile Error

rollercoaster.cpp: In function ‘int main()’:
rollercoaster.cpp:45:19: error: no pre-decrement operator for type
45 | cout << (*--aa.end) - (*aa.begin) << " ";
| ^~~
rollercoaster.cpp:45:31: error: invalid use of member function ‘std::multiset<_Key, _Compare, _Alloc>::iterator std::multiset<_Key, _Compare, _Alloc>::begin() const [with _Key = long long int; _Compare = std::less<long long int>; _Alloc = std::allocator<long long int>; std::multiset<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree_const_iterator<long long int>]’ (did you forget the ‘()’ ?)
45 | cout << (*--aa.end) - (*aa.begin) << " ";
| ~~~^~~~~
| ()