Problem bestplace
User ChenXuan
Submission Time 2024-08-03 20:33:09
Score 0
Max Time N/A
Max Memory N/A

Compile Error

bestplace.cpp: In function ‘void push_front(int)’:
bestplace.cpp:17:31: error: no match for ‘operator=’ (operand types are ‘std::__cxx11::list<int>::iterator’ {aka ‘std::_List_iterator<int>’} and ‘std::__cxx11::list<long int>::iterator’ {aka ‘std::_List_iterator<long int>’})
17 | mapping[subID] = jq.begin();
| ^
In file included from /usr/include/c++/9/list:63,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:79,
from bestplace.cpp:3:
/usr/include/c++/9/bits/stl_list.h:185:12: note: candidate: ‘constexpr std::_List_iterator<int>& std::_List_iterator<int>::operator=(const std::_List_iterator<int>&)’
185 | struct _List_iterator
| ^~~~~~~~~~~~~~
/usr/include/c++/9/bits/stl_list.h:185:12: note: no known conversion for argument 1 from ‘std::__cxx11::list<long int>::iterator’ {aka ‘std::_List_iterator<long