실행 실패 (제출 코드 컴파일 에러)
{"stderr": "Main.cpp: In function \u2018int main()\u2019:\nMain.cpp:16:17: error: no match for \u2018operator+\u2019 (operand types are \u2018std::vector<int>\u2019 and \u2018int\u2019)\n 16 | sort(num, num + N);\n | ~~~ ^ ~\n | | |\n | | int\n | std::vector<int>\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:585:5: note: candidate: \u2018template<class _Iterator> constexpr std::reverse_iterator<_IteratorL> std::operator+(typename std::reverse_iterator<_IteratorL>::difference_type, const std::reverse_iterator<_IteratorL>&)\u2019\n 585 | operator+(typename reverse_iterator<_Iterator>::difference_type __n,\n | ^~~~~~~~\n/usr/include/c++/11/bits/stl_iterator.h:585:5: note: template argument deduction/substitution failed:\nMain.cpp:16:19: note: mismatched types \u2018const std::reverse_iterator<_IteratorL>\u2019 and \u2018int\u2019\n 16 | sort(num, num + N);\n | ^\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:1700:5: note: candidate: \u2018template<class _Iterator> constexpr std::move_iterator<_IteratorL> std::operator+(typename std::move_iterator<_IteratorL>::difference_type, const std::move_iterator<_IteratorL>&)\u2019\n 1700 | operator+(typename move_iterator<_Iterator>::difference_type __n,\n | ^~~~~~~~\n/usr/include/c++/11/bits/stl_iterator.h:1700:5: note: template argument deduction/substitution failed:\nMain.cpp:16:19: note: mismatched types \u2018const std::move_iterator<_IteratorL>\u2019 and \u2018int\u2019\n 16 | sort(num, num + N);\n | ^\nIn file included from /usr/include/c++/11/string:55,\n from /usr/include/c++/11/bits/locale_classes.h:40,\n from /usr/include/c++/11/bits/ios_base.h:41,\n from /usr/include/c++/11/ios:42,\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/basic_string.h:6095:5: note: candidate: \u2018template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&, const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&)\u2019\n 6095 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,\n | ^~~~~~~~\n/usr/include/c++/11/bits/basic_string.h:6095:5: note: template argument deduction/substitution failed:\nMain.cpp:16:19: note: \u2018std::vector<int>\u2019 is not derived from \u2018const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>\u2019\n 16 | sort(num, num + N);\n | ^\nIn file included from /usr/include/c++/11/string:56,\n from /usr/include/c++/11/bits/locale_classes.h:40,\n from /usr/include/c++/11/bits/ios_base.h:41,\n from /usr/include/c++/11/ios:42,\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/basic_string.tcc:1169:5: note: candidate: \u2018template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Allocator> std::operator+(const _Cha(...truncated, total 16158 characters)
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
반례를 발견하지 못했습니다.