실행 실패 (제출 코드 컴파일 에러)
Main.cpp: In function ‘void recurs(int)’: Main.cpp:12:25: error: reference to ‘map’ is ambiguous 12 | array<int, 2> arr = map[node]; | ^~~ In file included from /usr/include/c++/11/map:61, from Main.cpp:3: /usr/include/c++/11/bits/stl_map.h:100:11: note: candidates are: ‘template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map’ 100 | class map | ^~~ Main.cpp:8:35: note: ‘std::unordered_map<int, std::array<int, 2> > map’ 8 | unordered_map<int, array<int, 2>> map; | ^~~ Main.cpp: In function ‘int main(int, char**)’: Main.cpp:30:9: error: reference to ‘map’ is ambiguous 30 | map[n] = {0, 0}; | ^~~ In file included from /usr/include/c++/11/map:61, from Main.cpp:3: /usr/include/c++/11/bits/stl_map.h:100:11: note: candidates are: ‘template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map’ 100 | class map | ^~~ Main.cpp:8:35: note: ‘std::unordered_map<int, std::array<int, 2> > map’ 8 | unordered_map<int, array<int, 2>> map; | ^~~ Main.cpp:34:17: error: reference to ‘map’ is ambiguous 34 | map[prev][0] = n; | ^~~ In file included from /usr/include/c++/11/map:61, from Main.cpp:3: /usr/include/c++/11/bits/stl_map.h:100:11: note: candidates are: ‘template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map’ 100 | class map | ^~~ Main.cpp:8:35: note: ‘std::unordered_map<int, std::array<int, 2> > map’ 8 | unordered_map<int, array<int, 2>> map; | ^~~ Main.cpp:44:17: error: reference to ‘map’ is ambiguous 44 | map[parent][1] = n; | ^~~ In file included from /usr/include/c++/11/map:61, from Main.cpp:3: /usr/include/c++/11/bits/stl_map.h:100:11: note: candidates are: ‘template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map’ 100 | class map | ^~~ Main.cpp:8:35: note: ‘std::unordered_map<int, std::array<int, 2> > map’ 8 | unordered_map<int, array<int, 2>> map; | ^~~ Main.cpp:50:26: error: ‘INT_MAX’ was not declared in this scope 50 | parents[n] = INT_MAX; | ^~~~~~~ Main.cpp:5:1: note: ‘INT_MAX’ is defined in header ‘<climits>’; did you forget to ‘#include <climits>’? 4 | #include <unordered_map> +++ |+#include <climits> 5 |
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
비공개 코드입니다. 코드 작성자만 볼 수 있습니다.
반례를 발견하지 못했습니다.