/in/foo.cc: In function 'int main()':
/in/foo.cc:14:28: error: no matching function for call to 'binary_search(Node [10010], Node*)'
if (!binary_search(a, a+i)) avy += (a+i)->y;
^
In file included from /usr/include/c++/6/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:65,
from /in/foo.cc:1:
/usr/include/c++/6/bits/stl_algo.h:2244:5: note: candidate: template<class _FIter, class _Tp> bool std::binary_search(_FIter, _FIter, const _Tp&)
binary_search(_ForwardIterator __first, _ForwardIterator __last,
^~~~~~~~~~~~~
/usr/include/c++/6/bits/stl_algo.h:2244:5: note: template argument deduction/substitution failed:
/in/foo.cc:14:28: note: candidate expects 3 arguments, 2 provided
if (!binary_search(a, a+i)) avy += (a+i)->y;
^
In file included from /usr/include/c++/6/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:65,
from /in/foo.cc:1:
/usr/include/c++/6/bits/stl_algo.h:2277:5: note: candidate: template<class _FIter, class _Tp, class _Compare> bool std::binary_search(_FIter, _FIter, const _Tp&, _Compare)
binary_search(_ForwardIterator __first, _ForwardIterator __last,
^~~~~~~~~~~~~
/usr/include/c++/6/bits/stl_algo.h:2277:5: note: template argument deduction/substitution failed:
/in/foo.cc:14:28: note: candidate expects 4 arguments, 2 provided
if (!binary_search(a, a+i)) avy += (a+i)->y;
^