Problem lightningrod
User Poket
Submission Time 2023-02-17 16:24:48
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lightningrod.cpp: In function ‘int main()’:
lightningrod.cpp:75:34: error: no match for ‘operator+’ (operand types are ‘std::__cxx11::list<std::pair<int, long long int> >::iterator’ {aka ‘std::_List_iterator<std::pair<int, long long int> >’} and ‘__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type’ {aka ‘int’})
75 | v.erase(v.begin()+deleting[x]);
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 lightningrod.cpp:1:
/usr/include/c++/9/bits/stl_iterator.h:423:5: note: candidate: ‘template<class _Iterator> constexpr std::reverse_iterator<_Iterator> std::operator+(typename std::reverse_iterator<_Iterator>::difference_type, con