실행 실패 (제출 코드 컴파일 에러)
{"stderr": "Main.cpp: In function \u2018int main()\u2019:\nMain.cpp:33:64: error: no matching function for call to \u2018std::_List_iterator<int>::_List_iterator(<brace-enclosed initializer list>)\u2019\n 33 | for (std::list<int>::iterator it { cardsToSum.rbegin() }; it != cardsToSum.rend(); it = std::next(it, 1))\n | ^\nIn file included from /usr/include/c++/11/list:63,\n from Main.cpp:6:\n/usr/include/c++/11/bits/stl_list.h:201:7: note: candidate: \u2018std::_List_iterator< <template-parameter-1-1> >::_List_iterator(std::__detail::_List_node_base*) [with _Tp = int]\u2019\n 201 | _List_iterator(__detail::_List_node_base* __x) _GLIBCXX_NOEXCEPT\n | ^~~~~~~~~~~~~~\n/usr/include/c++/11/bits/stl_list.h:201:49: note: no known conversion for argument 1 from \u2018std::__cxx11::list<int>::reverse_iterator\u2019 {aka \u2018std::reverse_iterator<std::_List_iterator<int> >\u2019} to \u2018std::__detail::_List_node_base*\u2019\n 201 | _List_iterator(__detail::_List_node_base* __x) _GLIBCXX_NOEXCEPT\n | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~\n/usr/include/c++/11/bits/stl_list.h:197:7: note: candidate: \u2018std::_List_iterator< <template-parameter-1-1> >::_List_iterator() [with _Tp = int]\u2019\n 197 | _List_iterator() _GLIBCXX_NOEXCEPT\n | ^~~~~~~~~~~~~~\n/usr/include/c++/11/bits/stl_list.h:197:7: note: candidate expects 0 arguments, 1 provided\n/usr/include/c++/11/bits/stl_list.h:186:12: note: candidate: \u2018constexpr std::_List_iterator<int>::_List_iterator(const std::_List_iterator<int>&)\u2019\n 186 | struct _List_iterator\n | ^~~~~~~~~~~~~~\n/usr/include/c++/11/bits/stl_list.h:186:12: note: no known conversion for argument 1 from \u2018std::__cxx11::list<int>::reverse_iterator\u2019 {aka \u2018std::reverse_iterator<std::_List_iterator<int> >\u2019} to \u2018const std::_List_iterator<int>&\u2019\n/usr/include/c++/11/bits/stl_list.h:186:12: note: candidate: \u2018constexpr std::_List_iterator<int>::_List_iterator(std::_List_iterator<int>&&)\u2019\n/usr/include/c++/11/bits/stl_list.h:186:12: note: no known conversion for argument 1 from \u2018std::__cxx11::list<int>::reverse_iterator\u2019 {aka \u2018std::reverse_iterator<std::_List_iterator<int> >\u2019} to \u2018std::_List_iterator<int>&&\u2019\nMain.cpp:33:70: error: no match for \u2018operator!=\u2019 (operand types are \u2018std::__cxx11::list<int>::iterator\u2019 and \u2018std::__cxx11::list<int>::reverse_iterator\u2019 {aka \u2018std::reverse_iterator<std::_List_iterator<int> >\u2019})\n 33 | for (std::list<int>::iterator it { cardsToSum.rbegin() }; it != cardsToSum.rend(); it = std::next(it, 1))\n | ~~ ^~ ~~~~~~~~~~~~~~~~~\n | | |\n | | std::__cxx11::list<int>::reverse_iterator {aka std::reverse_iterator<std::_List_iterator<int> >}\n | std::__cxx11::list<int>::iterator\nIn file included from /usr/include/c++/11/bits/stl_algobase.h:67,\n from /usr/include/c++/11/bits/char_traits.h:39,\n from /usr/include/c++/11/ios:40,\n from /usr/include/c++/11/ostream:38,\n from /usr/include/c++/11/iostream:39,\n from Main.cpp:1:\n/usr/include/c++/11/bits/stl_iterator.h:495:5: note: candidate: \u2018template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const std::reverse_iterator<_IteratorL>&, const std::reverse_iterator<_IteratorR>&) requires requires{{std::operator==::__x->base() == std::operator==::__y->base()} -> decltype(auto) [requires std::convertible_to<<placeholder>, bool>];}(...truncated, total 32884 characters)
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
비공개 코드입니다. 코드 작성자만 볼 수 있습니다.
반례를 발견하지 못했습니다.