실행 실패 (제출 코드 컴파일 에러)
Main.cpp: In function ‘int main()’: Main.cpp:21:24: error: no matching function for call to ‘lower_bound(std::vector<int>::iterator, std::vector<int>::iterator)’ 21 | cout << lower_bound(num.begin(), num.end()), num2[j]) - num.begin() << " "; | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ In file included 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_algobase.h:1490:5: note: candidate: ‘template<class _ForwardIterator, class _Tp> constexpr _ForwardIterator std::lower_bound(_ForwardIterator, _ForwardIterator, const _Tp&)’ 1490 | lower_bound(_ForwardIterator __first, _ForwardIterator __last, | ^~~~~~~~~~~ /usr/include/c++/11/bits/stl_algobase.h:1490:5: note: template argument deduction/substitution failed: Main.cpp:21:24: note: candidate expects 3 arguments, 2 provided 21 | cout << lower_bound(num.begin(), num.end()), num2[j]) - num.begin() << " "; | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ 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:2011:5: note: candidate: ‘template<class _FIter, class _Tp, class _Compare> constexpr _FIter std::lower_bound(_FIter, _FIter, const _Tp&, _Compare)’ 2011 | lower_bound(_ForwardIterator __first, _ForwardIterator __last, | ^~~~~~~~~~~ /usr/include/c++/11/bits/stl_algo.h:2011:5: note: template argument deduction/substitution failed: Main.cpp:21:24: note: candidate expects 4 arguments, 2 provided 21 | cout << lower_bound(num.begin(), num.end()), num2[j]) - num.begin() << " "; | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/c++/11/bits/stl_algobase.h:71, 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/predefined_ops.h: In instantiation of ‘constexpr bool __gnu_cxx::__ops::_Iter_comp_iter<_Compare>::operator()(_Iterator1, _Iterator2) [with _Iterator1 = __gnu_cxx::__normal_iterator<int*, std::vector<int> >; _Iterator2 = __gnu_cxx::__normal_iterator<int*, std::vector<int> >; _Compare = __gnu_cxx::__normal_iterator<int*, std::vector<int> >]’: /usr/include/c++/11/bits/stl_algo.h:931:20: required from ‘constexpr _ForwardIterator std::__unique(_ForwardIterator, _ForwardIterator, _BinaryPredicate) [with _ForwardIterator = __gnu_cxx::__normal_iterator<int*, std::vector<int> >; _BinaryPredicate = __gnu_cxx::__ops::_Iter_comp_iter<__gnu_cxx::__normal_iterator<int*, std::vector<int> > >]’ /usr/include/c++/11/bits/stl_algo.h:995:27: required from ‘constexpr _FIter std::unique(_FIter, _FIter, _BinaryPredicate) [with _FIter = __gnu_cxx::__normal_iterator<int*, std::vector<int> >; _BinaryPredicate = __gnu_cxx::__normal_iterator<int*, std::vector<int> >]’ Main.cpp:18:19: required from here /usr/include/c++/11/bits/predefined_ops.h:158:30: error: no match for call to ‘(__gnu_cxx::__normal_iterator<int*, std::vector<int> >) (int&, int&)’ 158 | { return bool(_M_comp(*__it1, *__it2)); } | ~~~~~~~^~~~~~~~~~~~~~~~
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
반례를 발견하지 못했습니다.