실행 실패 (제출 코드 컴파일 에러)
{"stderr": "Main.cpp: In function \u2018int main()\u2019:\nMain.cpp:15:15: error: no matching function for call to \u2018std::set<int>::insert(std::string&)\u2019\n 15 | s.insert(noHear);\n | ~~~~~~~~^~~~~~~~\nIn file included from /usr/include/c++/11/set:61,\n from Main.cpp:2:\n/usr/include/c++/11/bits/stl_set.h:566:9: note: candidate: \u2018template<class _InputIterator> void std::set<_Key, _Compare, _Alloc>::insert(_InputIterator, _InputIterator) [with _InputIterator = _InputIterator; _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>]\u2019\n 566 | insert(_InputIterator __first, _InputIterator __last)\n | ^~~~~~\n/usr/include/c++/11/bits/stl_set.h:566:9: note: template argument deduction/substitution failed:\nMain.cpp:15:15: note: candidate expects 2 arguments, 1 provided\n 15 | s.insert(noHear);\n | ~~~~~~~~^~~~~~~~\nIn file included from /usr/include/c++/11/set:61,\n from Main.cpp:2:\n/usr/include/c++/11/bits/stl_set.h:509:7: note: candidate: \u2018std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(const value_type&) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator = std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator; typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other = std::allocator<int>; typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key> = __gnu_cxx::__alloc_traits<std::allocator<int>, int>::rebind<int>; typename _Alloc::value_type = int; std::set<_Key, _Compare, _Alloc>::value_type = int]\u2019\n 509 | insert(const value_type& __x)\n | ^~~~~~\n/usr/include/c++/11/bits/stl_set.h:509:32: note: no known conversion for argument 1 from \u2018std::string\u2019 {aka \u2018std::__cxx11::basic_string<char>\u2019} to \u2018const value_type&\u2019 {aka \u2018const int&\u2019}\n 509 | insert(const value_type& __x)\n | ~~~~~~~~~~~~~~~~~~^~~\n/usr/include/c++/11/bits/stl_set.h:518:7: note: candidate: \u2018std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(std::set<_Key, _Compare, _Alloc>::value_type&&) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator = std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator; typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other = std::allocator<int>; typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key> = __gnu_cxx::__alloc_traits<std::allocator<int>, int>::rebind<int>; typename _Alloc::value_type = int; std::set<_Key, _Compare, _Alloc>::value_type = int]\u2019\n 518 | insert(value_type&& __x)\n | ^~~~~~\n/usr/include/c++/11/bits/stl_set.h:518:27: note: no known conversion for argument 1 from \u2018std::string\u2019 {aka \u2018std::__cxx11::basic_string<char>\u2019} to \u2018std::set<int>::value_type&&\u2019 {aka \u2018int&&\u2019}\n 518 | insert(value_type&& __x)\n | ~~~~~~~~~~~~~^~~\n/usr/include/c++/11/bits/stl_set.h:546:7: note: candidate: \u2018std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(std::set<_Key, _Compare, _Alloc>::const_iterator, const value_type&) [with _Key = int; _Compare = std::less<int>; _Alloc = std::allocator<int>; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree<int,(...truncated, total 12336 characters)
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
반례를 발견하지 못했습니다.