Problem globalwarming
User Poket
Submission Time 2023-02-17 23:11:27
Score 0
Max Time N/A
Max Memory N/A

Compile Error

globalwarming.cpp: In function ‘int main()’:
globalwarming.cpp:64:60: error: no match for ‘operator-’ (operand types are ‘std::__cxx11::list<std::pair<long long int, int> >::iterator’ {aka ‘std::_List_iterator<std::pair<long long int, int> >’} and ‘std::_List_iterator<std::pair<long long int, int> >’)
64 | connecting_index.insert(islands[islands.begin()-y+1].second+1);
| ~~~~~~~~~~~~~~~^~
| | |
| | _List_iterator<[...]>
| _List_iterator<[...]>
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