실행 실패 (제출 코드 컴파일 에러)
{"stderr": "Main.cpp: In function \u2018int main()\u2019:\nMain.cpp:33:25: warning: comparison of integer expressions of different signedness: \u2018int\u2019 and \u2018std::vector<int>::size_type\u2019 {aka \u2018long unsigned int\u2019} [-Wsign-compare]\n 33 | for(int i = 0;i < v.size();i++) {\n | ~~^~~~~~~~~~\nMain.cpp:35:29: warning: comparison of integer expressions of different signedness: \u2018int\u2019 and \u2018std::vector<int>::size_type\u2019 {aka \u2018long unsigned int\u2019} [-Wsign-compare]\n 35 | for(int j = 0;j < v.size();j++) {\n | ~~^~~~~~~~~~\nMain.cpp:42:25: warning: comparison of integer expressions of different signedness: \u2018int\u2019 and \u2018std::vector<int>::size_type\u2019 {aka \u2018long unsigned int\u2019} [-Wsign-compare]\n 42 | for(int i = 0;i < price.size()-1;i++) {\n | ~~^~~~~~~~~~~~~~~~\nMain.cpp:44:38: error: \u2018rice\u2019 was not declared in this scope; did you mean \u2018price\u2019?\n 44 | ans -= ans(price[i+1] - [rice[i]]);\n | ^~~~\n | price\nMain.cpp:44:42: error: expected \u2018,\u2019 before \u2018[\u2019 token\n 44 | ans -= ans(price[i+1] - [rice[i]]);\n | ^\n | ,\nMain.cpp:44:42: error: expected identifier before \u2018[\u2019 token\nMain.cpp: In lambda function:\nMain.cpp:44:46: error: expected \u2018{\u2019 before \u2018)\u2019 token\n 44 | ans -= ans(price[i+1] - [rice[i]]);\n | ^\nMain.cpp: In function \u2018int main()\u2019:\nMain.cpp:44:35: error: no match for \u2018operator-\u2019 (operand types are \u2018__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type\u2019 {aka \u2018int\u2019} and \u2018main()::<lambda()>\u2019)\n 44 | ans -= ans(price[i+1] - [rice[i]]);\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:44:46: note: mismatched types \u2018const std::reverse_iterator<_IteratorL>\u2019 and \u2018__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type\u2019 {aka \u2018int\u2019}\n 44 | ans -= ans(price[i+1] - [rice[i]]);\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:44:46: note: mismatched types \u2018const std:(...truncated, total 4320 characters)
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
비공개 코드입니다. 코드 작성자만 볼 수 있습니다.
반례를 발견하지 못했습니다.