실행 실패 (제출 코드 컴파일 에러)
{"stderr": "Main.cpp: In function \u2018int main()\u2019:\nMain.cpp:16:20: error: no matching function for call to \u2018std::vector<std::pair<int, int> >::push_back(int&)\u2019\n 16 | v.push_back(taesu);\n | ~~~~~~~~~~~^~~~~~~\nIn file included from /usr/include/c++/11/vector:67,\n from /usr/include/c++/11/functional:62,\n from /usr/include/c++/11/pstl/glue_algorithm_defs.h:13,\n from /usr/include/c++/11/algorithm:74,\n from Main.cpp:1:\n/usr/include/c++/11/bits/stl_vector.h:1187:7: note: candidate: \u2018void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::value_type = std::pair<int, int>]\u2019\n 1187 | push_back(const value_type& __x)\n | ^~~~~~~~~\n/usr/include/c++/11/bits/stl_vector.h:1187:35: note: no known conversion for argument 1 from \u2018int\u2019 to \u2018const value_type&\u2019 {aka \u2018const std::pair<int, int>&\u2019}\n 1187 | push_back(const value_type& __x)\n | ~~~~~~~~~~~~~~~~~~^~~\n/usr/include/c++/11/bits/stl_vector.h:1203:7: note: candidate: \u2018void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::value_type = std::pair<int, int>]\u2019\n 1203 | push_back(value_type&& __x)\n | ^~~~~~~~~\n/usr/include/c++/11/bits/stl_vector.h:1203:30: note: no known conversion for argument 1 from \u2018int\u2019 to \u2018std::vector<std::pair<int, int> >::value_type&&\u2019 {aka \u2018std::pair<int, int>&&\u2019}\n 1203 | push_back(value_type&& __x)\n | ~~~~~~~~~~~~~^~~\nMain.cpp:19:26: warning: comparison of integer expressions of different signedness: \u2018int\u2019 and \u2018std::vector<std::pair<int, int> >::size_type\u2019 {aka \u2018long unsigned int\u2019} [-Wsign-compare]\n 19 | for(int i = 0; i < v.size(); i++)\n | ~~^~~~~~~~~~\nMain.cpp:20:25: error: no match for \u2018operator==\u2019 (operand types are \u2018__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type\u2019 {aka \u2018std::pair<int, int>\u2019} and \u2018int\u2019)\n 20 | if(v[i] == taesu)\nIn file included from /usr/include/c++/11/bits/stl_algobase.h:67,\n from /usr/include/c++/11/algorithm:61,\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>];}\u2019 (reversed)\n 495 | operator==(const reverse_iterator<_IteratorL>& __x,\n | ^~~~~~~~\n/usr/include/c++/11/bits/stl_iterator.h:495:5: note: template argument deduction/substitution failed:\nMain.cpp:20:28: note: mismatched types \u2018const std::reverse_iterator<_IteratorL>\u2019 and \u2018int\u2019\n 20 | if(v[i] == taesu)\n | ^~~~~\nIn file included from /usr/include/c++/11/bits/stl_algobase.h:67,\n from /usr/include/c++/11/algorithm:61,\n from Main.cpp:1:\n/usr/include/c++/11/bits/stl_iterator.h:1585:5: note: candidate: \u2018template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorR>&) requires requires{{std::operator==::__x->base() == std::operator==::__y->base()} -> decltype(auto) [requires std::convertible_to<<placeholder>, bool>];}\u2019 (reversed)\n 1585 | operator==(const move_iterator<_IteratorL>& __x,\n (...truncated, total 56108 characters, 1 lines)
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
비공개 코드입니다. 코드 작성자만 볼 수 있습니다.
반례를 발견하지 못했습니다.