실행 실패 (제출 코드 컴파일 에러)
{"stderr": "Main.cpp: In function \u2018int main()\u2019:\nMain.cpp:33:81: error: no match for \u2018operator=\u2019 (operand types are \u2018__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type\u2019 {aka \u2018std::pair<int, int>\u2019} and \u2018<brace-enclosed initializer list>\u2019)\n 33 | v[i] = {v[i -1].first + v[i -2].first,v[i -1].second,v[i - 2].second}; //\uba4d\uccad\uc774 \uad6c\ubd84\uc744 \ud574\uc57c\ub418\uc790\ub098\n | ^\nIn file included from /usr/include/c++/11/bits/stl_algobase.h:64,\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_pair.h:418:9: note: candidate: \u2018template<class _U1, class _U2> constexpr typename std::enable_if<std::__and_<std::is_assignable<_T1&, const _U1&>, std::is_assignable<_T2&, const _U2&> >::value, std::pair<_T1, _T2>&>::type std::pair<_T1, _T2>::operator=(const std::pair<_U1, _U2>&) [with _U1 = _U1; _U2 = _U2; _T1 = int; _T2 = int]\u2019\n 418 | operator=(const pair<_U1, _U2>& __p)\n | ^~~~~~~~\n/usr/include/c++/11/bits/stl_pair.h:418:9: note: template argument deduction/substitution failed:\nMain.cpp:33:81: note: couldn\u2019t deduce template parameter \u2018_U1\u2019\n 33 | v[i] = {v[i -1].first + v[i -2].first,v[i -1].second,v[i - 2].second}; //\uba4d\uccad\uc774 \uad6c\ubd84\uc744 \ud574\uc57c\ub418\uc790\ub098\n | ^\nIn file included from /usr/include/c++/11/bits/stl_algobase.h:64,\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_pair.h:430:9: note: candidate: \u2018template<class _U1, class _U2> constexpr typename std::enable_if<std::__and_<std::is_assignable<_T1&, _U1&&>, std::is_assignable<_T2&, _U2&&> >::value, std::pair<_T1, _T2>&>::type std::pair<_T1, _T2>::operator=(std::pair<_U1, _U2>&&) [with _U1 = _U1; _U2 = _U2; _T1 = int; _T2 = int]\u2019\n 430 | operator=(pair<_U1, _U2>&& __p)\n | ^~~~~~~~\n/usr/include/c++/11/bits/stl_pair.h:430:9: note: template argument deduction/substitution failed:\nMain.cpp:33:81: note: couldn\u2019t deduce template parameter \u2018_U1\u2019\n 33 | v[i] = {v[i -1].first + v[i -2].first,v[i -1].second,v[i - 2].second}; //\uba4d\uccad\uc774 \uad6c\ubd84\uc744 \ud574\uc57c\ub418\uc790\ub098\n | ^\nIn file included from /usr/include/c++/11/bits/stl_algobase.h:64,\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_pair.h:390:7: note: candidate: \u2018constexpr std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(typename std::conditional<std::__and_<std::is_copy_assignable<_T1>, std::is_copy_assignable<_T2> >::value, const std::pair<_T1, _T2>&, const std::__nonesuch&>::type) [with _T1 = int; _T2 = int; typename std::conditional<std::__and_<std::is_copy_assignable<_T1>, std::is_copy_assignable<_T2> >::value, const std::pair<_T1, _T2>&, const std::__nonesuch&>::type = const std::pair<int, int>&]\u2019\n 390 | operator=(typename conditional<\n | ^~~~~~~~\n/usr/include/c++/11/bits/stl_pair.h:393:55: note: no known conversi(...truncated, total 6008 characters)
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
반례를 발견하지 못했습니다.