실행 실패 (제출 코드 컴파일 에러)
{"stderr": "Main.cpp: In function \u2018int main()\u2019:\nMain.cpp:27:33: error: no match for \u2018operator-\u2019 (operand types are \u2018std::vector<std::__cxx11::basic_string<char> >\u2019 and \u2018int\u2019)\n 27 | for (const string& s: words -1 )\n | ~~~~~ ^~\n | | |\n | | int\n | std::vector<std::__cxx11::basic_string<char> >\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:577:5: note: candidate: \u2018template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const std::reverse_iterator<_IteratorL>&, const std::reverse_iterator<_IteratorR>&)\u2019\n 577 | operator-(const reverse_iterator<_IteratorL>& __x,\n | ^~~~~~~~\n/usr/include/c++/11/bits/stl_iterator.h:577:5: note: template argument deduction/substitution failed:\nMain.cpp:27:34: note: \u2018std::vector<std::__cxx11::basic_string<char> >\u2019 is not derived from \u2018const std::reverse_iterator<_IteratorL>\u2019\n 27 | for (const string& s: words -1 )\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:1693:5: note: candidate: \u2018template<class _IteratorL, class _IteratorR> constexpr decltype ((__x.base() - __y.base())) std::operator-(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorR>&)\u2019\n 1693 | operator-(const move_iterator<_IteratorL>& __x,\n | ^~~~~~~~\n/usr/include/c++/11/bits/stl_iterator.h:1693:5: note: template argument deduction/substitution failed:\nMain.cpp:27:34: note: \u2018std::vector<std::__cxx11::basic_string<char> >\u2019 is not derived from \u2018const std::move_iterator<_IteratorL>\u2019\n 27 | for (const string& s: words -1 )\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:1255:5: note: candidate: \u2018template<class _IteratorL, class _IteratorR, class _Container> constexpr decltype ((__lhs.base() - __rhs.base())) __gnu_cxx::operator-(const __gnu_cxx::__normal_iterator<_IteratorL, _Container>&, const __gnu_cxx::__normal_iterator<_IteratorR, _Container>&)\u2019\n 1255 | operator-(const __normal_iterator<_IteratorL, _Container>& __lhs,\n | ^~~~~~~~\n/usr/include/c++/11/bits/stl_iterator.h:1255:5: note: template argument deduction/substitution failed:\nMain.cpp:27:34: note: \u2018std::vector<std::__cxx11::basic_string<char> >\u2019 is not derived from \u2018const __gnu_cxx::__normal_iterator<_IteratorL, _Container>\u2019\n 27 | for (const string& s: words -1 )\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.cp(...truncated, total 4829 characters, 1 lines)
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
반례를 발견하지 못했습니다.