실행 실패 (제출 코드 컴파일 에러)
{"stderr": "Main.cpp: In function \u2018void moveSharks()\u2019:\nMain.cpp:38:39: error: no match for \u2018operator=\u2019 (operand types are \u2018std::map<std::pair<int, int>, std::tuple<int, int, int, int, int> >::mapped_type\u2019 {aka \u2018std::tuple<int, int, int, int, int>\u2019} and \u2018<brace-enclosed initializer list>\u2019)\n 38 | newPos[pos] = {v, d, s, id};\n | ^\nIn file included from /usr/include/c++/11/bits/stl_map.h:63,\n from /usr/include/c++/11/map:61,\n from Main.cpp:2:\n/usr/include/c++/11/tuple:921:9: note: candidate: \u2018template<class ... _UElements> constexpr std::__enable_if_t<__assignable<const _UElements& ...>(), std::tuple<_Elements>&> std::tuple<_Elements>::operator=(const std::tuple<_Args1 ...>&) [with _UElements = {_UElements ...}; _Elements = {int, int, int, int, int}]\u2019\n 921 | operator=(const tuple<_UElements...>& __in)\n | ^~~~~~~~\n/usr/include/c++/11/tuple:921:9: note: template argument deduction/substitution failed:\n/usr/include/c++/11/tuple: In substitution of \u2018template<class ... _UElements> constexpr std::__enable_if_t<__assignable<const _UElements& ...>(), std::tuple<int, int, int, int, int>&> std::tuple<int, int, int, int, int>::operator=<_UElements ...>(const std::tuple<_Tps ...>&) [with _UElements = {}]\u2019:\nMain.cpp:38:39: required from here\n/usr/include/c++/11/tuple:920:57: error: no matching function for call to \u2018std::tuple<int, int, int, int, int>::__assignable<>()\u2019\n 920 | __enable_if_t<__assignable<const _UElements&...>(), tuple&>\n | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~\n/usr/include/c++/11/tuple:643:9: note: candidate: \u2018template<class ... _UElements> static constexpr std::__enable_if_t<(sizeof... (_UElements) == sizeof... (_Elements)), bool> std::tuple<_Elements>::__assignable() [with _UElements = {_UElements ...}; _Elements = {int, int, int, int, int}]\u2019\n 643 | __assignable()\n | ^~~~~~~~~~~~\n/usr/include/c++/11/tuple:643:9: note: template argument deduction/substitution failed:\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 from /usr/include/c++/11/iostream:39,\n from Main.cpp:1:\n/usr/include/c++/11/type_traits: In substitution of \u2018template<bool _Cond, class _Tp> using __enable_if_t = typename std::enable_if::type [with bool _Cond = false; _Tp = bool]\u2019:\n/usr/include/c++/11/tuple:643:2: required by substitution of \u2018template<class ... _UElements> static constexpr std::__enable_if_t<(sizeof... (_UElements) == 5), bool> std::tuple<int, int, int, int, int>::__assignable<_UElements ...>() [with _UElements = {}]\u2019\n/usr/include/c++/11/tuple:920:50: required by substitution of \u2018template<class ... _UElements> constexpr std::__enable_if_t<__assignable<const _UElements& ...>(), std::tuple<int, int, int, int, int>&> std::tuple<int, int, int, int, int>::operator=<_UElements ...>(const std::tuple<_Tps ...>&) [with _UElements = {}]\u2019\nMain.cpp:38:39: required from here\n/usr/include/c++/11/type_traits:2205:11: error: no type named \u2018type\u2019 in \u2018struct std::enable_if<false, bool>\u2019\n 2205 | using __enable_if_t = typename enable_if<_Cond, _Tp>::type;\n | ^~~~~~~~~~~~~\nIn file included from /usr/include/c++/11/bits/stl_map.h:63,\n from /usr/include/c++/11/map:61,\n from Main.cpp:2:\n/usr/include/c++/11/tuple:931:9: note: candidate: \u2018template<class ... _UElements> constexpr std::__enable_if_t<__assignable<_UElements ...>(), std::tuple<_Elements>&> std::tuple<_Elements>::operator=(std::tuple<_Args1 ..(...truncated, total 8146 characters)
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
반례를 발견하지 못했습니다.