실행 실패 (제출 코드 컴파일 에러)
Main.cpp: In function ‘void operation(std::string)’: Main.cpp:18:9: error: reference to ‘count’ is ambiguous 18 | count++; | ^~~~~ In file included from /usr/include/c++/11/string:52, 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:8:5: note: ‘int count’ 8 | int count = 0; | ^~~~~ Main.cpp:21:13: error: reference to ‘count’ is ambiguous 21 | if (count <= 0) { | ^~~~~ In file included from /usr/include/c++/11/string:52, 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:8:5: note: ‘int count’ 8 | int count = 0; | ^~~~~ Main.cpp:26:13: error: reference to ‘count’ is ambiguous 26 | count--; | ^~~~~ In file included from /usr/include/c++/11/string:52, 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:8:5: note: ‘int count’ 8 | int count = 0; | ^~~~~ Main.cpp:30:13: error: reference to ‘count’ is ambiguous 30 | count--; | ^~~~~ In file included from /usr/include/c++/11/string:52, 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:8:5: note: ‘int count’ 8 | int count = 0; | ^~~~~ Main.cpp:32:13: error: reference to ‘count’ is ambiguous 32 | if (count == 0) { | ^~~~~ In file included from /usr/include/c++/11/string:52, 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:8:5: note: ‘int count’ 8 | int count = 0; | ^~~~~ Main.cpp: In function ‘std::vector<int> solution(std::vector<std::__cxx11::basic_string<char> >)’: Main.cpp:43:9: error: reference to ‘count’ is ambiguous 43 | if (count == 0) { | ^~~~~ In file included from /usr/include/c++/11/string:52, 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:8:5: note: ‘int count’ 8 | int count = 0; | ^~~~~ Main.cpp:49:1: warning: control reaches end of non-void function [-Wreturn-type] 49 | } | ^
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
반례를 발견하지 못했습니다.