실행 실패 (제출 코드 컴파일 에러)
Main.cpp: In function ‘void fill(int)’: Main.cpp:26:25: error: reference to ‘count’ is ambiguous 26 | if (lscnt[i] == count[i]) continue; | ^~~~~ In file included from /usr/include/c++/11/string:52, from /usr/include/c++/11/bits/locale_classes.h:40, from /usr/include/c++/11/bits/ios_base.h:41, from /usr/include/c++/11/ios:42, from /usr/include/c++/11/ostream:38, from /usr/include/c++/11/iostream:39, from Main.cpp:1: /usr/include/c++/11/bits/stl_algo.h:4059:5: note: candidates are: ‘template<class _IIter, class _Tp> constexpr typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::count(_IIter, _IIter, const _Tp&)’ 4059 | count(_InputIterator __first, _InputIterator __last, const _Tp& __value) | ^~~~~ Main.cpp:14:5: note: ‘int count [10000]’ 14 | int count[MAX_LENGTH] = { 0, }; | ^~~~~ Main.cpp: In function ‘int main()’: Main.cpp:41:45: error: reference to ‘count’ is ambiguous 41 | for (int i = 0; i < N; i++) { cin >> x; count[x]++; } | ^~~~~ In file included from /usr/include/c++/11/string:52, from /usr/include/c++/11/bits/locale_classes.h:40, from /usr/include/c++/11/bits/ios_base.h:41, from /usr/include/c++/11/ios:42, from /usr/include/c++/11/ostream:38, from /usr/include/c++/11/iostream:39, from Main.cpp:1: /usr/include/c++/11/bits/stl_algo.h:4059:5: note: candidates are: ‘template<class _IIter, class _Tp> constexpr typename std::iterator_traits< <template-parameter-1-1> >::difference_type std::count(_IIter, _IIter, const _Tp&)’ 4059 | count(_InputIterator __first, _InputIterator __last, const _Tp& __value) | ^~~~~ Main.cpp:14:5: note: ‘int count [10000]’ 14 | int count[MAX_LENGTH] = { 0, }; | ^~~~~
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
반례를 발견하지 못했습니다.