실행 실패 (제출 코드 컴파일 에러)
Main.cpp: In function ‘int main()’: Main.cpp:69:12: error: no match for ‘operator!=’ (operand types are ‘std::__cxx11::list<char>::iterator’ and ‘int’) 69 | if(iter!=0) | ~~~~^~~ | | | | | int | std::__cxx11::list<char>::iterator In file included from /usr/include/c++/11/bits/stl_algobase.h:67, from /usr/include/c++/11/bits/char_traits.h:39, from /usr/include/c++/11/ios:40, from /usr/include/c++/11/ostream:38, from /usr/include/c++/11/iostream:39, from Main.cpp:1: /usr/include/c++/11/bits/stl_iterator.h:495:5: note: candidate: ‘template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const std::reverse_iterator<_IteratorL>&, const std::reverse_iterator<_IteratorR>&) requires requires{{std::operator==::__x->base() == std::operator==::__y->base()} -> decltype(auto) [requires std::convertible_to<<placeholder>, bool>];}’ (reversed) 495 | operator==(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/11/bits/stl_iterator.h:495:5: note: template argument deduction/substitution failed: Main.cpp:69:14: note: mismatched types ‘const std::reverse_iterator<_IteratorL>’ and ‘int’ 69 | if(iter!=0) | ^ In file included from /usr/include/c++/11/bits/stl_algobase.h:67, from /usr/include/c++/11/bits/char_traits.h:39, from /usr/include/c++/11/ios:40, from /usr/include/c++/11/ostream:38, from /usr/include/c++/11/iostream:39, from Main.cpp:1: /usr/include/c++/11/bits/stl_iterator.h:1585:5: note: candidate: ‘template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorR>&) requires requires{{std::operator==::__x->base() == std::operator==::__y->base()} -> decltype(auto) [requires std::convertible_to<<placeholder>, bool>];}’ (reversed) 1585 | operator==(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/11/bits/stl_iterator.h:1585:5: note: template argument deduction/substitution failed: Main.cpp:69:14: note: mismatched types ‘const std::move_iterator<_IteratorL>’ and ‘int’ 69 | if(iter!=0) | ^ In file included from /usr/include/c++/11/string:41, 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/allocator.h:218:5: note: candidate: ‘template<class _T1, class _T2> constexpr bool std::operator==(const std::allocator<_CharT>&, const std::allocator<_T2>&)’ (reversed) 218 | operator==(const allocator<_T1>&, const allocator<_T2>&) | ^~~~~~~~ /usr/include/c++/11/bits/allocator.h:218:5: note: template argument deduction/substitution failed: Main.cpp:69:14: note: mismatched types ‘const std::allocator<_CharT>’ and ‘int’ 69 | if(iter!=0) | ^ In file included from /usr/include/c++/11/bits/basic_string.h:48, from /usr/include/c++/11/string:55, 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/string_view:541:5: note: candidate: ‘template<class _CharT, class _Traits> constexpr bool std::operator==(std::basic_string_view<_CharT, _Traits>, std::__type_identity_t<std::basic_string_view<_CharT, _Traits> >)’ (reversed) 541 | operator==(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/11/string_view:541:5: note: template argument deduction/substitution failed: Main.cpp:69:14: note: mismatched types ‘std::basic_string_view<_CharT, _Traits>’ and ‘int’ 69 | if(iter!=0) | ^ In file included from /usr/include/c++/11/string:55, 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/basic_string.h:6248:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)’ (reversed) 6248 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/11/bits/basic_string.h:6248:5: note: template argument deduction/substitution failed: Main.cpp:69:14: note: mismatched types ‘const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>’ and ‘int’ 69 | if(iter!=0) | ^ In file included from /usr/include/c++/11/bits/ios_base.h:46, 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/system_error:368:3: note: candidate: ‘bool std::operator==(const std::error_code&, const std::error_condition&)’ (reversed) 368 | operator==(const error_code& __lhs, const error_condition& __rhs) noexcept | ^~~~~~~~ /usr/include/c++/11/system_error:368:32: note: no known conversion for argument 1 from ‘int’ to ‘const std::error_code&’ 368 | operator==(const error_code& __lhs, const error_condition& __rhs) noexcept | ~~~~~~~~~~~~~~~~~~^~~~~ In file included from /usr/include/c++/11/iosfwd:40, from /usr/include/c++/11/ios:38, from /usr/include/c++/11/ostream:38, from /usr/include/c++/11/iostream:39, from Main.cpp:1: /usr/include/c++/11/bits/postypes.h:222:5: note: candidate: ‘template<class _StateT> bool std::operator==(const std::fpos<_StateT>&, const std::fpos<_StateT>&)’ (rewritten) 222 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) | ^~~~~~~~ /usr/include/c++/11/bits/postypes.h:222:5: note: template argument deduction/substitution failed: Main.cpp:69:14: note: ‘std::__cxx11::list<char>::iterator’ is not derived from ‘const std::fpos<_StateT>’ 69 | if(iter!=0) | ^ In file included from /usr/include/c++/11/bits/stl_algobase.h:64, from /usr/include/c++/11/bits/char_traits.h:39, from /usr/include/c++/11/ios:40, from /usr/include/c++/11/ostream:38, from /usr/include/c++/11/iostream:39, from Main.cpp:1: /usr/include/c++/11/bits/stl_pair.h:466:5: note: candidate: ‘template<class _T1, class _T2> constexpr bool std::operator==(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)’ (rewritten) 466 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/11/bits/stl_pair.h:466:5: note: template argument deduction/substitution failed: Main.cpp:69:14: note: ‘std::__cxx11::list<char>::iterator’ is not derived from ‘const std::pair<_T1, _T2>’ 69 | if(iter!=0) | ^ In file included from /usr/include/c++/11/bits/stl_algobase.h:67, from /usr/include/c++/11/bits/char_traits.h:39, from /usr/include/c++/11/ios:40, from /usr/include/c++/11/ostream:38, from /usr/include/c++/11/iostream:39, from Main.cpp:1: /usr/include/c++/11/bits/stl_iterator.h:547:5: note: candidate: ‘template<class _Iterator> constexpr bool std::operator==(const std::reverse_iterator<_IteratorL>&, const std::reverse_iterator<_IteratorL>&) requires requires{{std::operator==::__x->base() == std::operator==::__y->base()} -> decltype(auto) [requires std::convertible_to<<placeholder>, bool>];}’ (rewritten) 547 | operator==(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/11/bits/stl_iterator.h:547:5: note: template argument deduction/substitution failed: Main.cpp:69:14: note: ‘std::__cxx11::list<char>::iterator’ is not derived from ‘const std::reverse_iterator<_IteratorL>’ 69 | if(iter!=0) | ^ In file included from /usr/include/c++/11/bits/stl_algobase.h:67, from /usr/include/c++/11/bits/char_traits.h:39, from /usr/include/c++/11/ios:40, from /usr/include/c++/11/ostream:38, from /usr/include/c++/11/iostream:39, from Main.cpp:1: /usr/include/c++/11/bits/stl_iterator.h:1648:5: note: candidate: ‘template<class _Iterator> constexpr bool std::operator==(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorL>&)’ (rewritten) 1648 | operator==(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/11/bits/stl_iterator.h:1648:5: note: template argument deduction/substitution failed: Main.cpp:69:14: note: ‘std::__cxx11::list<char>::iterator’ is not derived from ‘const std::move_iterator<_IteratorL>’ 69 | if(iter!=0) | ^ In file included from /usr/include/c++/11/bits/basic_string.h:48, from /usr/include/c++/11/string:55, 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/string_view:535:5: note: candidate: ‘template<class _CharT, class _Traits> constexpr bool std::operator==(std::basic_string_view<_CharT, _Traits>, std::basic_string_view<_CharT, _Traits>)’ (rewritten) 535 | operator==(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/11/string_view:535:5: note: template argument deduction/substitution failed: Main.cpp:69:14: note: ‘std::_List_iterator<char>’ is not derived from ‘std::basic_string_view<_CharT, _Traits>’ 69 | if(iter!=0) | ^ In file included from /usr/include/c++/11/string:55, 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/basic_string.h:6226:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&, const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&)’ (rewritten) 6226 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/11/bits/basic_string.h:6226:5: note: template argument deduction/substitution failed: Main.cpp:69:14: note: ‘std::__cxx11::list<char>::iterator’ is not derived from ‘const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>’ 69 | if(iter!=0) | ^ In file included from /usr/include/c++/11/string:55, 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/basic_string.h:6234:5: note: candidate: ‘template<class _CharT> typename __gnu_cxx::__enable_if<std::__is_char<_Tp>::__value, bool>::__type std::operator==(const std::__cxx11::basic_string<_CharT>&, const std::__cxx11::basic_string<_CharT>&)’ (rewritten) 6234 | operator==(const basic_string<_CharT>& __lhs, | ^~~~~~~~ /usr/include/c++/11/bits/basic_string.h:6234:5: note: template argument deduction/substitution failed: Main.cpp:69:14: note: ‘std::__cxx11::list<char>::iterator’ is not derived from ‘const std::__cxx11::basic_string<_CharT>’ 69 | if(iter!=0) | ^ In file included from /usr/include/c++/11/bits/locale_facets.h:48, from /usr/include/c++/11/bits/basic_ios.h:37, from /usr/include/c++/11/ios:44, from /usr/include/c++/11/ostream:38, from /usr/include/c++/11/iostream:39, from Main.cpp:1: /usr/include/c++/11/bits/streambuf_iterator.h:226:5: note: candidate: ‘template<class _CharT, class _Traits> bool std::operator==(const std::istreambuf_iterator<_CharT, _Traits>&, const std::istreambuf_iterator<_CharT, _Traits>&)’ (rewritten) 226 | operator==(const istreambuf_iterator<_CharT, _Traits>& __a, | ^~~~~~~~ /usr/include/c++/11/bits/streambuf_iterator.h:226:5: note: template argument deduction/substitution failed: Main.cpp:69:14: note: ‘std::__cxx11::list<char>::iterator’ is not derived from ‘const std::istreambuf_iterator<_CharT, _Traits>’ 69 | if(iter!=0) | ^ In file included from /usr/include/c++/11/list:63, from Main.cpp:2: /usr/include/c++/11/bits/stl_list.h:2030:5: note: candidate: ‘template<class _Tp, class _Alloc> bool std::operator==(const std::__cxx11::list<_Tp, _Alloc>&, const std::__cxx11::list<_Tp, _Alloc>&)’ (rewritten) 2030 | operator==(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y) | ^~~~~~~~ /usr/include/c++/11/bits/stl_list.h:2030:5: note: template argument deduction/substitution failed: Main.cpp:69:14: note: ‘std::__cxx11::list<char>::iterator’ is not derived from ‘const std::__cxx11::list<_Tp, _Alloc>’ 69 | if(iter!=0) | ^ In file included from /usr/include/c++/11/bits/ios_base.h:46, 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/system_error:362:3: note: candidate: ‘bool std::operator==(const std::error_code&, const std::error_code&)’ (rewritten) 362 | operator==(const error_code& __lhs, const error_code& __rhs) noexcept | ^~~~~~~~ /usr/include/c++/11/system_error:362:32: note: no known conversion for argument 1 from ‘std::__cxx11::list<char>::iterator’ to ‘const std::error_code&’ 362 | operator==(const error_code& __lhs, const error_code& __rhs) noexcept | ~~~~~~~~~~~~~~~~~~^~~~~ /usr/include/c++/11/system_error:376:3: note: candidate: ‘bool std::operator==(const std::error_condition&, const std::error_condition&)’ (rewritten) 376 | operator==(const error_condition& __lhs, | ^~~~~~~~ /usr/include/c++/11/system_error:376:37: note: no known conversion for argument 1 from ‘std::__cxx11::list<char>::iterator’ to ‘const std::error_condition&’ 376 | operator==(const error_condition& __lhs, | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~ In file included from /usr/include/c++/11/list:63, from Main.cpp:2: /usr/include/c++/11/bits/stl_list.h:248:7: note: candidate: ‘bool std::operator==(const _Self&, const _Self&)’ (rewritten) 248 | operator==(const _Self& __x, const _Self& __y) _GLIBCXX_NOEXCEPT | ^~~~~~~~ /usr/include/c++/11/bits/stl_list.h:248:49: note: no known conversion for argument 2 from ‘int’ to ‘const _Self&’ 248 | operator==(const _Self& __x, const _Self& __y) _GLIBCXX_NOEXCEPT | ~~~~~~~~~~~~~^~~ In file included from /usr/include/c++/11/iosfwd:40, from /usr/include/c++/11/ios:38, from /usr/include/c++/11/ostream:38, from /usr/include/c++/11/iostream:39, from Main.cpp:1: /usr/include/c++/11/bits/postypes.h:227:5: note: candidate: ‘template<class _StateT> bool std::operator!=(const std::fpos<_StateT>&, const std::fpos<_StateT>&)’ 227 | operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) | ^~~~~~~~ /usr/include/c++/11/bits/postypes.h:227:5: note: template argument deduction/substitution failed: Main.cpp:69:14: note: ‘std::__cxx11::list<char>::iterator’ is not derived from ‘const std::fpos<_StateT>’ 69 | if(iter!=0) | ^ In file included from /usr/include/c++/11/bits/stl_algobase.h:67, from /usr/include/c++/11/bits/char_traits.h:39, from /usr/include/c++/11/ios:40, from /usr/include/c++/11/ostream:38, from /usr/include/c++/11/iostream:39, from Main.cpp:1: /usr/include/c++/11/bits/stl_iterator.h:502:5: note: candidate: ‘template<class _IteratorL, class _IteratorR> constexpr bool std::operator!=(const std::reverse_iterator<_IteratorL>&, const std::reverse_iterator<_IteratorR>&) requires requires{{std::operator!=::__x->base() != std::operator!=::__y->base()} -> decltype(auto) [requires std::convertible_to<<placeholder>, bool>];}’ 502 | operator!=(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/11/bits/stl_iterator.h:502:5: note: template argument deduction/substitution failed: Main.cpp:69:14: note: ‘std::__cxx11::list<char>::iterator’ is not derived from ‘const std::reverse_iterator<_IteratorL>’ 69 | if(iter!=0) | ^ In file included from /usr/include/c++/11/bits/locale_facets.h:48, from /usr/include/c++/11/bits/basic_ios.h:37, from /usr/include/c++/11/ios:44, from /usr/include/c++/11/ostream:38, from /usr/include/c++/11/iostream:39, from Main.cpp:1: /usr/include/c++/11/bits/streambuf_iterator.h:232:5: note: candidate: ‘template<class _CharT, class _Traits> bool std::operator!=(const std::istreambuf_iterator<_CharT, _Traits>&, const std::istreambuf_iterator<_CharT, _Traits>&)’ 232 | operator!=(const istreambuf_iterator<_CharT, _Traits>& __a, | ^~~~~~~~ /usr/include/c++/11/bits/streambuf_iterator.h:232:5: note: template argument deduction/substitution failed: Main.cpp:69:14: note: ‘std::__cxx11::list<char>::iterator’ is not derived from ‘const std::istreambuf_iterator<_CharT, _Traits>’ 69 | if(iter!=0) | ^ Main.cpp:11:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 11 | scanf("%s",arr); | ~~~~~^~~~~~~~~~ Main.cpp:13:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 13 | scanf("%d",&n); | ~~~~~^~~~~~~~~ Main.cpp:32:18: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 32 | scanf("%c",&c); | ~~~~~^~~~~~~~~ Main.cpp:58:34: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 58 | scanf("%c",&d); | ~~~~~^~~~~~~~~
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
반례를 발견하지 못했습니다.