실행 실패 (제출 코드 컴파일 에러)
{"stderr": "Main.cpp: In function \u2018int main()\u2019:\nMain.cpp:22:20: error: no matching function for call to \u2018std::vector<std::tuple<int, int, int> >::push_back(<brace-enclosed initializer list>)\u2019\n 22 | v.push_back({start,end,length});\n | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~\nIn file included from /usr/include/c++/11/vector:67,\n from Main.cpp:2:\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::tuple<int, int, int>; _Alloc = std::allocator<std::tuple<int, int, int> >; std::vector<_Tp, _Alloc>::value_type = std::tuple<int, 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 \u2018<brace-enclosed initializer list>\u2019 to \u2018const value_type&\u2019 {aka \u2018const std::tuple<int, 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::tuple<int, int, int>; _Alloc = std::allocator<std::tuple<int, int, int> >; std::vector<_Tp, _Alloc>::value_type = std::tuple<int, 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 \u2018<brace-enclosed initializer list>\u2019 to \u2018std::vector<std::tuple<int, int, int> >::value_type&&\u2019 {aka \u2018std::tuple<int, int, int>&&\u2019}\n 1203 | push_back(value_type&& __x)\n | ~~~~~~~~~~~~~^~~\nMain.cpp:25:25: warning: left operand of comma operator has no effect [-Wunused-value]\n 25 | dp[i] = (dp[i-1]+1,dp[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: In instantiation of \u2018constexpr __gnu_cxx::__normal_iterator<_Iterator, _Container>& __gnu_cxx::__normal_iterator<_Iterator, _Container>::operator++() [with _Iterator = std::tuple<int, int, int>*; _Container = std::vector<std::tuple<int, int, int> >]\u2019:\nMain.cpp:26:28: required from here\n/usr/include/c++/11/bits/stl_iterator.h:1054:11: error: cannot increment a pointer to incomplete type \u2018std::tuple<int, int, int>\u2019\n 1054 | ++_M_current;\n | ^~~~~~~~~~\nMain.cpp:26:20: error: structured binding refers to incomplete type \u2018std::tuple<int, int, int>\u2019\n 26 | for (auto &[a,b,c]:v){\n | ^~~~~~~\nIn file included from /usr/include/c++/11/vector:67,\n from Main.cpp:2:\n/usr/include/c++/11/bits/stl_vector.h: In instantiation of \u2018std::_Vector_base<_Tp, _Alloc>::~_Vector_base() [with _Tp = std::tuple<int, int, int>; _Alloc = std::allocator<std::tuple<int, int, int> >]\u2019:\n/usr/include/c++/11/bits/stl_vector.h:487:7: required from here\n/usr/include/c++/11/bits/stl_vector.h:336:49: error: invalid use of incomplete type \u2018class std::tuple<int, int, int>\u2019\n 336 | _M_impl._M_end_of_storage - _M_impl._M_start);\n | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~\nIn file included from /usr/include/c++/11/bits/move.h:57,\n from /usr/include/c++/11/bits/exception_ptr.h:43,\n from /usr/include/c++/11/exception:153,\n from /usr/include/c++/11/ios:39,\n from /usr/include/c++/11/ostream:38,\n (...truncated, total 11590 characters, 1 lines)
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
반례를 발견하지 못했습니다.