Problem doubletrouble
User Henries
Submission Time 2024-10-13 21:11:27
Score 0
Max Time N/A
Max Memory N/A

Compile Error

doubletrouble.cpp: In function ‘void solve(std::multiset<long long int>, long long int)’:
doubletrouble.cpp:11:20: error: no match for ‘operator-’ (operand types are ‘std::multiset<long long int>::iterator’ {aka ‘std::_Rb_tree_const_iterator<long long int>’} and ‘int’)
11 | cout << *(ms.end()-1) % (1000000000 + 7);
| ~~~~~~~~^~
| | |
| | int
| std::multiset<long long int>::iterator {aka std::_Rb_tree_const_iterator<long long int>}
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
from /usr/include/c++/9/bits/specfun.h:45,
from /usr/include/c++/9/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:41,
from doubletrouble.cpp:1:
/usr/include/c++/9/bits/stl_iterator.h:415:5: note: candidate: ‘template<class _IteratorL, class _Ite