-
个人简介
该用户太懒,这里啥也没写 (´・ω・`)
€ ? ? ╂ ? ㈦ ⒓ ℉ 〓 ︾ ╢ ╪ | ╘ ﹖ ╄ 文 お ∵ ♀ ﹃ w ╦ の ≤ ≧ ▽ ≦ foo.cc: In function 'int main()': foo.cc:19:33: error: no match for 'operator+' (operand types are 'std::vector' and 'int') 19 | sort(v,v+n); | ~^~ | | | | | int | std::vector In file included from /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/stl_algobase.h:67, from /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/algorithm:60, from /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/x86_64-unknown-linux-gnu/bits/stdc++.h:51, from foo.cc:1: /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/stl_iterator.h:634:5: note: candidate: 'template std::reverse_iterator<_Iterator> std::operator+(typename reverse_iterator<_Iterator>::difference_type, const reverse_iterator<_Iterator>&)' 634 | operator+(typename reverse_iterator<_Iterator>::difference_type __n, | ^~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/stl_iterator.h:634:5: note: template argument deduction/substitution failed: foo.cc:19:34: note: mismatched types 'const std::reverse_iterator<_Iterator>' and 'int' 19 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/stl_iterator.h:1808:5: note: candidate: 'template std::move_iterator<_IteratorL> std::operator+(typename move_iterator<_IteratorL>::difference_type, const move_iterator<_IteratorL>&)' 1808 | operator+(typename move_iterator<_Iterator>::difference_type __n, | ^~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/stl_iterator.h:1808:5: note: template argument deduction/substitution failed: foo.cc:19:34: note: mismatched types 'const std::move_iterator<_IteratorL>' and 'int' 19 | sort(v,v+n); | ^ In file included from /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/string:54, from /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bitset:52, from /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/x86_64-unknown-linux-gnu/bits/stdc++.h:52: /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3553:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Alloc>&, const __cxx11::basic_string<_CharT, _Traits, _Alloc>&)' 3553 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3553:5: note: template argument deduction/substitution failed: foo.cc:19:34: note: 'std::vector' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>' 19 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3571:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Alloc>&)' 3571 | operator+(const _CharT* __lhs, | ^~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3571:5: note: template argument deduction/substitution failed: foo.cc:19:34: note: mismatched types 'const _CharT*' and 'std::vector' 19 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3590:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(_CharT, const __cxx11::basic_string<_CharT, _Traits, _Alloc>&)' 3590 | operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs) | ^~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3590:5: note: template argument deduction/substitution failed: foo.cc:19:34: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>' and 'int' 19 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3607:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)' 3607 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3607:5: note: template argument deduction/substitution failed: foo.cc:19:34: note: 'std::vector' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>' 19 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3625:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Alloc>&, _CharT)' 3625 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs) | ^~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3625:5: note: template argument deduction/substitution failed: foo.cc:19:34: note: 'std::vector' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>' 19 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3637:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Alloc>&&, const __cxx11::basic_string<_CharT, _Traits, _Alloc>&)' 3637 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, | ^~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3637:5: note: template argument deduction/substitution failed: foo.cc:19:34: note: 'std::vector' is not derived from 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>' 19 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3644:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Alloc>&, __cxx11::basic_string<_CharT, _Traits, _Alloc>&&)' 3644 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3644:5: note: template argument deduction/substitution failed: foo.cc:19:34: note: 'std::vector' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>' 19 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3651:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Alloc>&&, __cxx11::basic_string<_CharT, _Traits, _Alloc>&&)' 3651 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, | ^~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3651:5: note: template argument deduction/substitution failed: foo.cc:19:34: note: 'std::vector' is not derived from 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>' 19 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3674:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const _CharT*, __cxx11::basic_string<_CharT, _Traits, _Alloc>&&)' 3674 | operator+(const _CharT* __lhs, | ^~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3674:5: note: template argument deduction/substitution failed: foo.cc:19:34: note: mismatched types 'const _CharT*' and 'std::vector' 19 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3681:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(_CharT, __cxx11::basic_string<_CharT, _Traits, _Alloc>&&)' 3681 | operator+(_CharT __lhs, | ^~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3681:5: note: template argument deduction/substitution failed: foo.cc:19:34: note: mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>' and 'int' 19 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3688:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Alloc>&&, const _CharT*)' 3688 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, | ^~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3688:5: note: template argument deduction/substitution failed: foo.cc:19:34: note: 'std::vector' is not derived from 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>' 19 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3695:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Alloc>&&, _CharT)' 3695 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, | ^~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3695:5: note: template argument deduction/substitution failed: foo.cc:19:34: note: 'std::vector' is not derived from 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>' 19 | sort(v,v+n); | ^ In file included from /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/ccomplex:39, from /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/x86_64-unknown-linux-gnu/bits/stdc++.h:127: /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/complex:335:5: note: candidate: 'template std::complex<_Tp> std::operator+(const complex<_Tp>&, const complex<_Tp>&)' 335 | operator+(const complex<_Tp>& __x, const complex<_Tp>& __y) | ^~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/complex:335:5: note: template argument deduction/substitution failed: foo.cc:19:34: note: 'std::vector' is not derived from 'const std::complex<_Tp>' 19 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/complex:344:5: note: candidate: 'template std::complex<_Tp> std::operator+(const complex<_Tp>&, const _Tp&)' 344 | operator+(const complex<_Tp>& __x, const _Tp& __y) | ^~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/complex:344:5: note: template argument deduction/substitution failed: foo.cc:19:34: note: 'std::vector' is not derived from 'const std::complex<_Tp>' 19 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/complex:353:5: note: candidate: 'template std::complex<_Tp> std::operator+(const _Tp&, const complex<_Tp>&)' 353 | operator+(const _Tp& __x, const complex<_Tp>& __y) | ^~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/complex:353:5: note: template argument deduction/substitution failed: foo.cc:19:34: note: mismatched types 'const std::complex<_Tp>' and 'int' 19 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/complex:454:5: note: candidate: 'template std::complex<_Tp> std::operator+(const complex<_Tp>&)' 454 | operator+(const complex<_Tp>& __x) | ^~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/complex:454:5: note: template argument deduction/substitution failed: foo.cc:19:34: note: 'std::vector' is not derived from 'const std::complex<_Tp>' 19 | sort(v,v+n); | ^ In file included from /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/valarray:605, from /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/x86_64-unknown-linux-gnu/bits/stdc++.h:166: /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/valarray_after.h:405:5: note: candidate: 'template<class _Dom1, class _Dom2> std::_Expr<std::__detail::_BinClos<std::__plus, std::_Expr, std::_Expr, _Dom1, _Dom2>, typename std::__fun<std::__plus, typename _Dom1::value_type>::result_type> std::operator+(const _Expr<_Dom1, typename _Dom1::value_type>&, const _Expr<_Dom2, typename _Dom2::value_type>&)' 405 | _DEFINE_EXPR_BINARY_OPERATOR(+, struct std::__plus) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/valarray_after.h:405:5: note: template argument deduction/substitution failed: foo.cc:19:34: note: 'std::vector' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 19 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/valarray_after.h:405:5: note: candidate: 'template std::_Expr<std::__detail::_BinClos<std::__plus, std::_Expr, std::_Constant, _Dom, typename _Dom::value_type>, typename std::__fun<std::__plus, typename _Dom1::value_type>::result_type> std::operator+(const _Expr<_Dom1, typename _Dom1::value_type>&, const typename _Dom::value_type&)' 405 | _DEFINE_EXPR_BINARY_OPERATOR(+, struct std::__plus) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/valarray_after.h:405:5: note: template argument deduction/substitution failed: foo.cc:19:34: note: 'std::vector' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 19 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/valarray_after.h:405:5: note: candidate: 'template std::_Expr<std::__detail::_BinClos<std::__plus, std::_Constant, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__plus, typename _Dom1::value_type>::result_type> std::operator+(const typename _Dom::value_type&, const _Expr<_Dom1, typename _Dom1::value_type>&)' 405 | _DEFINE_EXPR_BINARY_OPERATOR(+, struct std::__plus) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/valarray_after.h:405:5: note: template argument deduction/substitution failed: foo.cc:19:34: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int' 19 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/valarray_after.h:405:5: note: candidate: 'template std::_Expr<std::__detail::_BinClos<std::__plus, std::_Expr, std::_ValArray, _Dom, typename _Dom::value_type>, typename std::__fun<std::__plus, typename _Dom1::value_type>::result_type> std::operator+(const _Expr<_Dom1, typename _Dom1::value_type>&, const valarray&)' 405 | _DEFINE_EXPR_BINARY_OPERATOR(+, struct std::__plus) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/valarray_after.h:405:5: note: template argument deduction/substitution failed: foo.cc:19:34: note: 'std::vector' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 19 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/valarray_after.h:405:5: note: candidate: 'template std::_Expr<std::__detail::_BinClos<std::__plus, std::_ValArray, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__plus, typename _Dom1::value_type>::result_type> std::operator+(const valarray&, const _Expr<_Dom1, typename _Dom1::value_type>&)' 405 | _DEFINE_EXPR_BINARY_OPERATOR(+, struct std::__plus) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/valarray_after.h:405:5: note: template argument deduction/substitution failed: foo.cc:19:34: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int' 19 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/valarray:1196:1: note: candidate: 'template std::_Expr<std::__detail::_BinClos<std::__plus, std::_ValArray, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__plus, _Tp>::result_type> std::operator+(const valarray<_Tp>&, const valarray<_Tp>&)' 1196 | _DEFINE_BINARY_OPERATOR(+, __plus) | ^~~~~~~~~~~~~~~~~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/valarray:1196:1: note: template argument deduction/substitution failed: foo.cc:19:34: note: 'std::vector' is not derived from 'const std::valarray<_Tp>' 19 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/valarray:1196:1: note: candidate: 'template std::_Expr<std::__detail::_BinClos<std::__plus, std::_ValArray, std::_Constant, _Tp, _Tp>, typename std::__fun<std::__plus, _Tp>::result_type> std::operator+(const valarray<_Tp>&, const typename valarray<_Tp>::value_type&)' 1196 | _DEFINE_BINARY_OPERATOR(+, __plus) | ^~~~~~~~~~~~~~~~~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/valarray:1196:1: note: template argument deduction/substitution failed: foo.cc:19:34: note: 'std::vector' is not derived from 'const std::valarray<_Tp>' 19 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/valarray:1196:1: note: candidate: 'template std::_Expr<std::__detail::_BinClos<std::__plus, std::_Constant, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__plus, _Tp>::result_type> std::operator+(const typename valarray<_Tp>::value_type&, const valarray<_Tp>&)' 1196 | _DEFINE_BINARY_OPERATOR(+, __plus) | ^~~~~~~~~~~~~~~~~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/valarray:1196:1: note: template argument deduction/substitution failed: foo.cc:19:34: note: mismatched types 'const std::valarray<_Tp>' and 'int' 19 | sort(v,v+n); | ^ foo.cc:22:32: error: no matching function for call to 'std::vector::erase(int&)' 22 | v.erase(k); | ~
/nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/stl_vector.h:1534:28: note: no known conversion for argument 1 from 'int' to 'std::vector::const_iterator' 1534 | erase(const_iterator __position) | ~^In file included from /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/vector:66, from /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/queue:63, from /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/x86_64-unknown-linux-gnu/bits/stdc++.h:157: /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/stl_vector.h:1534:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(const_iterator) [with _Tp = int; _Alloc = std::allocator; iterator = std::vector::iterator; const_iterator = std::vector::const_iterator]' 1534 | erase(const_iterator __position) | ^~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/stl_iterator.h:634:5: note: template argument deduction/substitution failed: foo.cc:35:18: note: mismatched types 'const std::reverse_iterator<_Iterator>' and 'int' 35 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/stl_iterator.h:1808:5: note: candidate: 'template std::move_iterator<_IteratorL> std::operator+(typename move_iterator<_IteratorL>::difference_type, const move_iterator<_IteratorL>&)' 1808 | operator+(typename move_iterator<_Iterator>::difference_type __n, | ^~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/stl_iterator.h:1808:5: note: template argument deduction/substitution failed: foo.cc:35:18: note: mismatched types 'const std::move_iterator<_IteratorL>' and 'int' 35 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3553:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Alloc>&, const __cxx11::basic_string<_CharT, _Traits, _Alloc>&)' 3553 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3553:5: note: template argument deduction/substitution failed: foo.cc:35:18: note: 'std::vector' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>' 35 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3571:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Alloc>&)' 3571 | operator+(const _CharT* __lhs, | ^~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3571:5: note: template argument deduction/substitution failed: foo.cc:35:18: note: mismatched types 'const _CharT*' and 'std::vector' 35 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3590:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(_CharT, const __cxx11::basic_string<_CharT, _Traits, _Alloc>&)' 3590 | operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs) | ^~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3590:5: note: template argument deduction/substitution failed: foo.cc:35:18: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>' and 'int' 35 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3607:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)' 3607 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3607:5: note: template argument deduction/substitution failed: foo.cc:35:18: note: 'std::vector' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>' 35 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3625:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Alloc>&, _CharT)' 3625 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs) | ^~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3625:5: note: template argument deduction/substitution failed: foo.cc:35:18: note: 'std::vector' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>' 35 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3637:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Alloc>&&, const __cxx11::basic_string<_CharT, _Traits, _Alloc>&)' 3637 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, | ^~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3637:5: note: template argument deduction/substitution failed: foo.cc:35:18: note: 'std::vector' is not derived from 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>' 35 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3644:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const __cxx11::basic_string<_CharT, _Traits, _Alloc>&, __cxx11::basic_string<_CharT, _Traits, _Alloc>&&)' 3644 | operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3644:5: note: template argument deduction/substitution failed: foo.cc:35:18: note: 'std::vector' is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>' 35 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3651:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Alloc>&&, __cxx11::basic_string<_CharT, _Traits, _Alloc>&&)' 3651 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, | ^~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3651:5: note: template argument deduction/substitution failed: foo.cc:35:18: note: 'std::vector' is not derived from 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>' 35 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3674:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(const _CharT*, __cxx11::basic_string<_CharT, _Traits, _Alloc>&&)' 3674 | operator+(const _CharT* __lhs, | ^~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3674:5: note: template argument deduction/substitution failed: foo.cc:35:18: note: mismatched types 'const _CharT*' and 'std::vector' 35 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3681:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(_CharT, __cxx11::basic_string<_CharT, _Traits, _Alloc>&&)' 3681 | operator+(_CharT __lhs, | ^~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3681:5: note: template argument deduction/substitution failed: foo.cc:35:18: note: mismatched types 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>' and 'int' 35 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3688:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Alloc>&&, const _CharT*)' 3688 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, | ^~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3688:5: note: template argument deduction/substitution failed: foo.cc:35:18: note: 'std::vector' is not derived from 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>' 35 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3695:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::operator+(__cxx11::basic_string<_CharT, _Traits, _Alloc>&&, _CharT)' 3695 | operator+(basic_string<_CharT, _Traits, _Alloc>&& __lhs, | ^~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/basic_string.h:3695:5: note: template argument deduction/substitution failed: foo.cc:35:18: note: 'std::vector' is not derived from 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>' 35 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/complex:335:5: note: candidate: 'template std::complex<_Tp> std::operator+(const complex<_Tp>&, const complex<_Tp>&)' 335 | operator+(const complex<_Tp>& __x, const complex<_Tp>& __y) | ^~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/complex:335:5: note: template argument deduction/substitution failed: foo.cc:35:18: note: 'std::vector' is not derived from 'const std::complex<_Tp>' 35 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/complex:344:5: note: candidate: 'template std::complex<_Tp> std::operator+(const complex<_Tp>&, const _Tp&)' 344 | operator+(const complex<_Tp>& __x, const _Tp& __y) | ^~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/complex:344:5: note: template argument deduction/substitution failed: foo.cc:35:18: note: 'std::vector' is not derived from 'const std::complex<_Tp>' 35 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/complex:353:5: note: candidate: 'template std::complex<_Tp> std::operator+(const _Tp&, const complex<_Tp>&)' 353 | operator+(const _Tp& __x, const complex<_Tp>& __y) | ^~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/complex:353:5: note: template argument deduction/substitution failed: foo.cc:35:18: note: mismatched types 'const std::complex<_Tp>' and 'int' 35 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/complex:454:5: note: candidate: 'template std::complex<_Tp> std::operator+(const complex<_Tp>&)' 454 | operator+(const complex<_Tp>& __x) | ^~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/complex:454:5: note: template argument deduction/substitution failed: foo.cc:35:18: note: 'std::vector' is not derived from 'const std::complex<_Tp>' 35 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/valarray_after.h:405:5: note: candidate: 'template<class _Dom1, class _Dom2> std::_Expr<std::__detail::_BinClos<std::__plus, std::_Expr, std::_Expr, _Dom1, _Dom2>, typename std::__fun<std::__plus, typename _Dom1::value_type>::result_type> std::operator+(const _Expr<_Dom1, typename _Dom1::value_type>&, const _Expr<_Dom2, typename _Dom2::value_type>&)' 405 | _DEFINE_EXPR_BINARY_OPERATOR(+, struct std::__plus) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/valarray_after.h:405:5: note: template argument deduction/substitution failed: foo.cc:35:18: note: 'std::vector' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 35 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/valarray_after.h:405:5: note: candidate: 'template std::_Expr<std::__detail::_BinClos<std::__plus, std::_Expr, std::_Constant, _Dom, typename _Dom::value_type>, typename std::__fun<std::__plus, typename _Dom1::value_type>::result_type> std::operator+(const _Expr<_Dom1, typename _Dom1::value_type>&, const typename _Dom::value_type&)' 405 | _DEFINE_EXPR_BINARY_OPERATOR(+, struct std::__plus) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/valarray_after.h:405:5: note: template argument deduction/substitution failed: foo.cc:35:18: note: 'std::vector' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 35 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/valarray_after.h:405:5: note: candidate: 'template std::_Expr<std::__detail::_BinClos<std::__plus, std::_Constant, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__plus, typename _Dom1::value_type>::result_type> std::operator+(const typename _Dom::value_type&, const _Expr<_Dom1, typename _Dom1::value_type>&)' 405 | _DEFINE_EXPR_BINARY_OPERATOR(+, struct std::__plus) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/valarray_after.h:405:5: note: template argument deduction/substitution failed: foo.cc:35:18: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int' 35 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/valarray_after.h:405:5: note: candidate: 'template std::_Expr<std::__detail::_BinClos<std::__plus, std::_Expr, std::_ValArray, _Dom, typename _Dom::value_type>, typename std::__fun<std::__plus, typename _Dom1::value_type>::result_type> std::operator+(const _Expr<_Dom1, typename _Dom1::value_type>&, const valarray&)' 405 | _DEFINE_EXPR_BINARY_OPERATOR(+, struct std::__plus) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/valarray_after.h:405:5: note: template argument deduction/substitution failed: foo.cc:35:18: note: 'std::vector' is not derived from 'const std::_Expr<_Dom1, typename _Dom1::value_type>' 35 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/valarray_after.h:405:5: note: candidate: 'template std::_Expr<std::__detail::_BinClos<std::__plus, std::_ValArray, std::_Expr, typename _Dom::value_type, _Dom>, typename std::__fun<std::__plus, typename _Dom1::value_type>::result_type> std::operator+(const valarray&, const _Expr<_Dom1, typename _Dom1::value_type>&)' 405 | _DEFINE_EXPR_BINARY_OPERATOR(+, struct std::__plus) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/valarray_after.h:405:5: note: template argument deduction/substitution failed: foo.cc:35:18: note: mismatched types 'const std::_Expr<_Dom1, typename _Dom1::value_type>' and 'int' 35 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/valarray:1196:1: note: candidate: 'template std::_Expr<std::__detail::_BinClos<std::__plus, std::_ValArray, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__plus, _Tp>::result_type> std::operator+(const valarray<_Tp>&, const valarray<_Tp>&)' 1196 | _DEFINE_BINARY_OPERATOR(+, __plus) | ^~~~~~~~~~~~~~~~~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/valarray:1196:1: note: template argument deduction/substitution failed: foo.cc:35:18: note: 'std::vector' is not derived from 'const std::valarray<_Tp>' 35 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/valarray:1196:1: note: candidate: 'template std::_Expr<std::__detail::_BinClos<std::__plus, std::_ValArray, std::_Constant, _Tp, _Tp>, typename std::__fun<std::__plus, _Tp>::result_type> std::operator+(const valarray<_Tp>&, const typename valarray<_Tp>::value_type&)' 1196 | _DEFINE_BINARY_OPERATOR(+, __plus) | ^~~~~~~~~~~~~~~~~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/valarray:1196:1: note: template argument deduction/substitution failed: foo.cc:35:18: note: 'std::vector' is not derived from 'const std::valarray<_Tp>' 35 | sort(v,v+n); | ^ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/valarray:1196:1: note: candidate: 'template std::_Expr<std::__detail::_BinClos<std::__plus, std::_Constant, std::_ValArray, _Tp, _Tp>, typename std::__fun<std::__plus, _Tp>::result_type> std::operator+(const typename valarray<_Tp>::value_type&, const valarray<_Tp>&)' 1196 | _DEFINE_BINARY_OPERATOR(+, __plus) | ^~~~~~~~~~~~~~~~~~~~~~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/valarray:1196:1: note: template argument deduction/substitution failed: foo.cc:35:18: note: mismatched types 'const std::valarray<_Tp>' and 'int' 35 | sort(v,v+n); | ^/nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/stl_vector.h:1562:7: note: candidate expects 2 arguments, 1 provided foo.cc:31:40: error: no matching function for call to 'std::vector::erase(int&)' 31 | v.erase(j); | ~~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/stl_vector.h:1562:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(const_iterator, const_iterator) [with _Tp = int; _Alloc = std::allocator; iterator = std::vector::iterator; const_iterator = std::vector::const_iterator]' 1562 | erase(const_iterator __first, const_iterator __last) | ^^/nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/stl_vector.h:1534:28: note: no known conversion for argument 1 from 'int' to 'std::vector::const_iterator' 1534 | erase(const_iterator __position) | ~^/nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/stl_vector.h:1534:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(const_iterator) [with _Tp = int; _Alloc = std::allocator; iterator = std::vector::iterator; const_iterator = std::vector::const_iterator]' 1534 | erase(const_iterator __position) | ^/nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/stl_vector.h:1562:7: note: candidate expects 2 arguments, 1 provided foo.cc:35:17: error: no match for 'operator+' (operand types are 'std::vector' and 'int') 35 | sort(v,v+n); | ~^~ | | | | | int | std::vector /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/stl_iterator.h:634:5: note: candidate: 'template std::reverse_iterator<_Iterator> std::operator+(typename reverse_iterator<_Iterator>::difference_type, const reverse_iterator<_Iterator>&)' 634 | operator+(typename reverse_iterator<_Iterator>::difference_type __n, | ^~ /nix/store/zc0nsv23pakbafngjy32kvhfzb16as43-gcc-13.3.0/include/c++/13.3.0/bits/stl_vector.h:1562:7: note: candidate: 'std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(const_iterator, const_iterator) [with _Tp = int; _Alloc = std::allocator; iterator = std::vector::iterator; const_iterator = std::vector::const_iterator]' 1562 | erase(const_iterator __first, const_iterator __last) | ^^ -
最近活动
- L2-13班 优先队列 - 课后作业 作业
- L2-13班 二叉堆 - 课后作业 作业
- L2-13班 树的综合练习 - 课后作业 作业
- L2-13班 二叉树 - 课后作业 作业
- L2-13班 简单树 - 课后作业 作业
- L2-13班 STL线性容器 课后作业 作业
- L2-13班 哈希表的应用 课后作业 作业
- L2-13班 哈希表 课后作业 作业
- L2-13班链表2课后作业 作业
- L2-13班链表1课后作业 作业
- L2-13班 多维背包 - 课后作业 作业
- L2-13班 背包测试 - 课上作业 作业
- L2-13班 背包问题3 - 课后作业 作业
- 寒假集训J14班 - 第5场模拟赛 OI
- 寒假集训J14班 - 第4场模拟赛 OI
- 寒假集训J14班 - 第3场模拟赛 OI
- 寒假集训J14班 - 第2场模拟赛 OI
- 寒假集训J14班题单 作业
- 寒假集训J14班 - 第1场模拟赛 OI
- L2-13班 背包问题2 - 课后作业 作业
- L2-13班 01背包 - 课后作业 作业
- L2-13班 线性DP练习 - 课后作业 作业
- L2-13班 线性DP - 课后作业 作业
- L2-13班 深搜综合练习 - 课后作业 作业
- 2026年南昌斯坦星球 1 月月赛-L2算法阶段 IOI
- L2-13班 DFS2 - 课后作业 作业
- L2-13班 八皇后问题 - 课后作业 作业
- G3-01班第三课课堂练习 作业
- 2025年南昌斯坦星球 12 月月赛-L2算法阶段 IOI
- 2025年南昌斯坦星球 12 月月赛-L1语法阶段 IOI
- G3-01班第二课课堂练习 作业
- L2-13班 测验 - 补题 作业
- L2-13班阶段小测 IOI
- .L2-13班 DFS - 课后作业 作业
- G3-01班第二周编程题 IOI
- G3-01班第二周选择题 OI
- G3-01班第一周作业 OI
- L2-13班 快排和归并 - 课后作业 作业
- L2-13班 二分答案 - 课后作业 作业
- L2-13班 分治 - 课后作业 作业
- L2-13班 BFS练习 - 课后作业 作业
- L2-13班 BFS练习 - 课上习题 作业
- L2-13班 解题练习 - 课后作业 作业
- L2-13班 广度优先搜索 - 课后作业 作业
- L2-13班 解题强化 - 课后作业 作业
- L2-13班 解题强化 - 课上习题 作业
- 2025年【JXCSP-X复赛】赛前第一场模拟赛 OI
- 国庆集训J11班 - 第三场模拟赛 OI
- L2-13班 循环队列 - 课后作业 作业
- 国庆集训J11班 - 第二场模拟赛 OI
- 国庆集训J11班题单 作业
- 国庆集训J11班 - 第一场模拟赛 OI
- L2-13班 队列 - 课后作业 作业
- L2-13班 队列 - 课上例题 作业
- 2025年南昌斯坦星球 9 月月赛-L2算法阶段 IOI
- 2025年南昌斯坦星球 9 月月赛-L1语法阶段 IOI
- L2-13班 栈2 - 课后作业 作业
- L2-13班 栈2 - 课上例题 作业
- L2-13班 栈 - 课后作业 作业
- L2-13班 栈 - 课上例题 作业
- L2-13班 位运算 - 课后作业 作业
- L2-13班 进制 - 课后作业 作业
- L2-13班 高精度算法二 - 课后作业 作业
- CSP暑期算法基础营J9班-模拟赛8 OI
- CSP暑期算法基础营J9班-模拟赛7 OI
- CSP暑期算法基础营J9班-模拟赛6 OI
- CSP暑期算法基础营J9班-模拟赛5 OI
- L2-13班 高精度算法一 - 课后作业 作业
- CSP暑期算法基础营J9班-模拟赛4 OI
- CSP暑期算法基础营J9班-模拟赛3 OI
- CSP暑期算法基础营J9班-模拟赛2 OI
- 暑假算法集训J9班-集训题单 作业
- CSP暑期算法基础营J9班-模拟赛1 OI
- L2-13班 差分 - 课后作业 作业
- L2-13班 前缀和 - 课后作业 作业
- L2-13班 双指针- 课后作业 作业
- L2-13班 贪心算法2- 课后作业 作业
- L2-13班 贪心算法1 - 课后作业 作业
- L2-13班 递推算法 - 课后作业 作业
- L2-13班 枚举算法2 - 课后作业 作业
- L2-13班 枚举算法1 - 课后作业 作业
- 算法阶段热身题 作业
- L1-15 班语法测试补题作业 作业
- L1-15 班语法阶段总测评-编程题 IOI
- L1-15 班语法阶段总测验-选择题 OI
- L1-15 班语法复习作业 作业
- L1-15 班语法复习作业 作业
- L1-15 班成员函数作业 作业
- 2025年南昌斯坦星球 5 月月赛-L1语法阶段 IOI
- L1-15 班结构体作业 作业
- L1-15 班递归作业 作业
- L1-15 班自定义函数作业 作业
- L1-15 班数组综合测试补题 作业
- L1-15 班数组综合测试 IOI
- L1-15 班蛇形数组作业 作业
- 2025年南昌斯坦星球 4 月月赛-L1语法阶段 IOI
- L1-15 班回型方阵作业 作业
- L1-15 班二维数组作业 作业
- 选班测试题 IOI