실행 실패 (제출 코드 컴파일 에러)
{"stderr": "Main.cpp:7:1: error: \u2018unordered_map\u2019 does not name a type\n 7 | unordered_map<int, array<int, 2>> map;\n | ^~~~~~~~~~~~~\nMain.cpp: In function \u2018void recurs(int)\u2019:\nMain.cpp:11:28: error: missing template arguments before \u2018[\u2019 token\n 11 | array<int, 2> arr = map[node];\n | ^\nMain.cpp: In function \u2018int main(int, char**)\u2019:\nMain.cpp:24:5: error: \u2018unordered_map\u2019 was not declared in this scope\n 24 | unordered_map<int, int> parents;\n | ^~~~~~~~~~~~~\nMain.cpp:4:1: note: \u2018std::unordered_map\u2019 is defined in header \u2018<unordered_map>\u2019; did you forget to \u2018#include <unordered_map>\u2019?\n 3 | #include <map>\n +++ |+#include <unordered_map>\n 4 | \nMain.cpp:24:19: error: expected primary-expression before \u2018int\u2019\n 24 | unordered_map<int, int> parents;\n | ^~~\nMain.cpp:29:23: error: class template argument deduction failed:\n 29 | map[n] = {0, 0};\n | ^\nMain.cpp:29:23: error: no matching function for call to \u2018map(int, int)\u2019\nIn file included from /usr/include/c++/11/map:61,\n from Main.cpp:3:\n/usr/include/c++/11/bits/stl_map.h:290:9: note: candidate: \u2018template<class _Key, class _Tp, class _Compare, class _Alloc, class _InputIterator> map(_InputIterator, _InputIterator, const _Compare&, const _Alloc&)-> std::map<_Key, _Tp, _Compare, _Alloc>\u2019\n 290 | map(_InputIterator __first, _InputIterator __last,\n | ^~~\n/usr/include/c++/11/bits/stl_map.h:290:9: note: template argument deduction/substitution failed:\nMain.cpp:29:23: note: candidate expects 4 arguments, 2 provided\n 29 | map[n] = {0, 0};\n | ^\nIn file included from /usr/include/c++/11/map:61,\n from Main.cpp:3:\n/usr/include/c++/11/bits/stl_map.h:273:9: note: candidate: \u2018template<class _Key, class _Tp, class _Compare, class _Alloc, class _InputIterator> map(_InputIterator, _InputIterator)-> std::map<_Key, _Tp, _Compare, _Alloc>\u2019\n 273 | map(_InputIterator __first, _InputIterator __last)\n | ^~~\n/usr/include/c++/11/bits/stl_map.h:273:9: note: template argument deduction/substitution failed:\nMain.cpp:29:23: note: couldn\u2019t deduce template parameter \u2018_Key\u2019\n 29 | map[n] = {0, 0};\n | ^\nIn file included from /usr/include/c++/11/map:61,\n from Main.cpp:3:\n/usr/include/c++/11/bits/stl_map.h:256:9: note: candidate: \u2018template<class _Key, class _Tp, class _Compare, class _Alloc, class _InputIterator> map(_InputIterator, _InputIterator, const _Alloc&)-> std::map<_Key, _Tp, _Compare, _Alloc>\u2019\n 256 | map(_InputIterator __first, _InputIterator __last,\n | ^~~\n/usr/include/c++/11/bits/stl_map.h:256:9: note: template argument deduction/substitution failed:\nMain.cpp:29:23: note: candidate expects 3 arguments, 2 provided\n 29 | map[n] = {0, 0};\n | ^\nIn file included from /usr/include/c++/11/map:61,\n from Main.cpp:3:\n/usr/include/c++/11/bits/stl_map.h:250:7: note: candidate: \u2018template<class _Key, class _Tp, class _Compare, class _Alloc> map(std::initializer_list<std::pair<const _Key, _Tp> >, const _Alloc&)-> std::map<_Key, _Tp, _Compare, _Alloc>\u2019\n 250 | map(initializer_list<value_type> __l, const allocator_type& __a)\n | ^~~\n/usr/include/c++/11/bits/stl_map.h:250:7: note: template argument deduction/substitution failed:\nMain.cpp:29:23: note: mismatched types \u2018std::initializer_list<std::pair<const _Key, _Tp> >\u2019 and \u2018int\u2019\n 29 | map[n] = {0, 0};\n | ^\nIn file included from /usr/include/c++/11/map:61,\n from Main.cpp:3:\n/usr/include/c++/11/bits/stl_map.h:24(...truncated, total 14923 characters, 1 lines)
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
비공개 코드입니다. 코드 작성자만 볼 수 있습니다.
반례를 발견하지 못했습니다.