실행 실패 (제출 코드 컴파일 에러)
{"stderr": "Main.cpp: In function \u2018void myFunc(int)\u2019:\nMain.cpp:32:21: error: no match for \u2018operator=\u2019 (operand types are \u2018std::vector<std::stack<int> >\u2019 and \u2018std::stack<int>\u2019)\n 32 | tmp_s[i] = *it;\n | ^~\nIn file included from /usr/include/c++/11/vector:72,\n from Main.cpp:4:\n/usr/include/c++/11/bits/vector.tcc:198:5: note: candidate: \u2018std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = std::stack<int>; _Alloc = std::allocator<std::stack<int> >]\u2019\n 198 | vector<_Tp, _Alloc>::\n | ^~~~~~~~~~~~~~~~~~~\n/usr/include/c++/11/bits/vector.tcc:199:42: note: no known conversion for argument 1 from \u2018std::stack<int>\u2019 to \u2018const std::vector<std::stack<int> >&\u2019\n 199 | operator=(const vector<_Tp, _Alloc>& __x)\n | ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~\nIn file included from /usr/include/c++/11/vector:67,\n from Main.cpp:4:\n/usr/include/c++/11/bits/stl_vector.h:709:7: note: candidate: \u2018std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = std::stack<int>; _Alloc = std::allocator<std::stack<int> >]\u2019\n 709 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())\n | ^~~~~~~~\n/usr/include/c++/11/bits/stl_vector.h:709:26: note: no known conversion for argument 1 from \u2018std::stack<int>\u2019 to \u2018std::vector<std::stack<int> >&&\u2019\n 709 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())\n | ~~~~~~~~~^~~\n/usr/include/c++/11/bits/stl_vector.h:730:7: note: candidate: \u2018std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = std::stack<int>; _Alloc = std::allocator<std::stack<int> >]\u2019\n 730 | operator=(initializer_list<value_type> __l)\n | ^~~~~~~~\n/usr/include/c++/11/bits/stl_vector.h:730:46: note: no known conversion for argument 1 from \u2018std::stack<int>\u2019 to \u2018std::initializer_list<std::stack<int> >\u2019\n 730 | operator=(initializer_list<value_type> __l)\n | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~\nMain.cpp:33:28: error: \u2018class std::vector<std::stack<int> >\u2019 has no member named \u2018top\u2019\n 33 | int top = tmp_s[i].top();\n | ^~~\nMain.cpp:36:40: error: \u2018class std::vector<std::stack<int> >\u2019 has no member named \u2018pop\u2019\n 36 | if (top >= input) tmp_s[i].pop();\n | ^~~\nMain.cpp:39:26: error: \u2018class std::vector<std::stack<int> >\u2019 has no member named \u2018push\u2019\n 39 | tmp_s[i].push(tmp);\n | ^~~~\nMain.cpp:39:31: error: \u2018tmp\u2019 was not declared in this scope; did you mean \u2018top\u2019?\n 39 | tmp_s[i].push(tmp);\n | ^~~\n | top\nMain.cpp:44:59: error: cannot convert \u2018std::vector<std::stack<int> >*\u2019 to \u2018std::stack<int>*\u2019\n 44 | if (tmp_s[0].size() < tmp_s[1].size()) clearStack(&tmp_s[0]);\n | ^~~~~~~~~\n | |\n | std::vector<std::stack<int> >*\nMain.cpp:18:29: note: initializing argument 1 of \u2018void clearStack(std::stack<int>*)\u2019\n 18 | void clearStack(stack<int>* s)\n | ~~~~~~~~~~~~^\nMain.cpp:45:25: error: cannot convert \u2018std::vector<std::stack<int> >*\u2019 to \u2018std::stack<int>*\u2019\n 45 | else clearStack(&tmp_s[1]);\n | ^~~~~~~~~\n | |\n | (...truncated, total 6421 characters, 1 lines)
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
반례를 발견하지 못했습니다.