highway.cpp: In function 'int find(int, int, std::vector<int>, std::vector<int>)':
highway.cpp:38:21: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
38 | int mid = l + r >> 1;
| ~~^~~
highway.cpp:59:21: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
59 | int mid = l + r >> 1;
| ~~^~~
highway.cpp: In function 'void find_pair(int, std::vector<int>, std::vector<int>, int, int)':
highway.cpp:74:28: error: no matching function for call to 'find(int, std::vector<int>&, std::vector<int>&, std::vector<int>&)'
74 | int t = find(0, u, u, v);
| ^
highway.cpp:20:5: note: candidate: 'int find(int, int, std::vector<int>, std::vector<int>)'
20 | int find(int start, int n, vector<int> u, vector<int> v) {
| ^~~~
highway.cpp:20:25: note: no known conversion for argument 2 from 'std::vector<int>' to 'int'
20 | int find(int start, int n, vector<int> u, vector<int> v) {
| ~~~~^
In file included from /usr/include/c++/10/bits/locale_facets.h:48,
from /usr/include/c++/10/bits/basic_ios.h:37,
from /usr/include/c++/10/ios:44,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from highway.cpp:2:
/usr/include/c++/10/bits/streambuf_iterator.h:422:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(std::istreambuf_iterator<_CharT>, std::istreambuf_iterator<_CharT>, const _CharT2&)'
422 | find(istreambuf_iterator<_CharT> __first,
| ^~~~
/usr/include/c++/10/bits/streambuf_iterator.h:422:5: note: template argument deduction/substitution failed:
highway.cpp:74:28: note: mismatched types 'std::istreambuf_iterator<_CharT>' and 'int'
74 | int t = find(0, u, u, v);
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from highway.cpp:2:
/usr/include/c++/10/bits/stl_algo.h:3894:5: note: candidate: 'template<class _IIter, class _Tp> _IIter std::find(_IIter, _IIter, const _Tp&)'
3894 | find(_InputIterator __first, _InputIterator __last,
| ^~~~
/usr/include/c++/10/bits/stl_algo.h:3894:5: note: template argument deduction/substitution failed:
highway.cpp:74:28: note: deduced conflicting types for parameter '_IIter' ('int' and 'std::vector<int>')
74 | int t = find(0, u, u, v);
| ^
In file included from /usr/include/c++/10/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from highway.cpp:2:
/usr/include/c++/10/pstl/glue_algorithm_defs.h:60:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> std::find(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
60 | find(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
| ^~~~
/usr/include/c++/10/pstl/glue_algorithm_defs.h:60:1: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/10/pstl/glue_algorithm_defs.h:15,
from /usr/include/c++/10/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from highway.cpp:2:
/usr/include/c++/10/pstl/execution_defs.h: In substitution of 'template<class _ExecPolicy, class _Tp> using __enable_if_execution_policy = typename std::enable_if<__pstl::execution::v1::is_execution_policy<typename std::remove_cv<typename std::remove_reference<_Tp>::type>::type>::value, _Tp>::type [with _ExecPolicy = int; _Tp = std::vector<int>]':
/usr/include/c++/10/pstl/glue_algorithm_defs.h:60:1: required by substitution of 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> std::find(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&) [with _ExecutionPolicy = int; _ForwardIterator = std::vector<int>; _Tp = std::vector<int>]'
highway.cpp:74:28: required from here
/usr/include/c++/10/pstl/execution_defs.h:150:7: error: no type named 'type' in 'struct std::enable_if<false, std::vector<int> >'
150 | using __enable_if_execution_policy =
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
highway.cpp:74:9: warning: unused variable 't' [-Wunused-variable]
74 | int t = find(0, u, u, v);
| ^