실행 실패 (제출 코드 컴파일 에러)
Main.cpp: In function ‘int main()’: Main.cpp:47:33: error: no matching function for call to ‘std::__cxx11::list<int>::erase(std::__cxx11::list<int>::reverse_iterator&)’ 47 | cardsToSum.erase(it); | ~~~~~~~~~~~~~~~~^~~~ In file included from /usr/include/c++/11/list:64, from Main.cpp:6: /usr/include/c++/11/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::__cxx11::list<int>::iterator; std::__cxx11::list<_Tp, _Alloc>::const_iterator = std::__cxx11::list<int>::const_iterator]’ 150 | list<_Tp, _Alloc>:: | ^~~~~~~~~~~~~~~~~ /usr/include/c++/11/bits/list.tcc:152:26: note: no known conversion for argument 1 from ‘std::__cxx11::list<int>::reverse_iterator’ {aka ‘std::reverse_iterator<std::_List_iterator<int> >’} to ‘std::__cxx11::list<int>::const_iterator’ 152 | erase(const_iterator __position) noexcept | ~~~~~~~~~~~~~~~^~~~~~~~~~ In file included from /usr/include/c++/11/list:63, from Main.cpp:6: /usr/include/c++/11/bits/stl_list.h:1457:7: note: candidate: ‘std::__cxx11::list<_Tp, _Alloc>::iterator std::__cxx11::list<_Tp, _Alloc>::erase(std::__cxx11::list<_Tp, _Alloc>::const_iterator, std::__cxx11::list<_Tp, _Alloc>::const_iterator) [with _Tp = int; _Alloc = std::allocator<int>; std::__cxx11::list<_Tp, _Alloc>::iterator = std::__cxx11::list<int>::iterator; std::__cxx11::list<_Tp, _Alloc>::const_iterator = std::__cxx11::list<int>::const_iterator]’ 1457 | erase(const_iterator __first, const_iterator __last) noexcept | ^~~~~ /usr/include/c++/11/bits/stl_list.h:1457:7: note: candidate expects 2 arguments, 1 provided
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
비공개 코드입니다. 코드 작성자만 볼 수 있습니다.
반례를 발견하지 못했습니다.