Problem leave
User StormyGood
Submission Time 2025-11-09 20:16:43
Score 0
Max Time N/A
Max Memory N/A

Compile Error

leave.cpp: In function ‘int main()’:
leave.cpp:25:13: error: no matching function for call to ‘std::__cxx11::list<int>::erase(int&)’
25 | d.erase(c);
| ^
In file included from /usr/include/c++/9/list:64,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:79,
from leave.cpp:1:
/usr/include/c++/9/bits/list.tcc:150:5: note: candidate: ‘std::__cxx11::list<_Tp, _Alloc>::iterator std::__cxx11::list<_Tp, _Alloc>::erase(std::__cxx11::list<_Tp, _Alloc>::const_iterator) [with _Tp = int; _Alloc = std::allocator<int>; std::__cxx11::list<_Tp, _Alloc>::iterator = std::_List_iterator<int>; std::__cxx11::list<_Tp, _Alloc>::const_iterator = std::_List_const_iterator<int>]’
150 | list<_Tp, _Alloc>::
| ^~~~~~~~~~~~~~~~~
/usr/include/c++/9/bits/list.tcc:152:26: note: no known conversion for argument 1 from ‘int’ to ‘std::__cxx11::list<