/ Vijos /

记录详情

Compile Error

/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;
                            ^

信息

递交者
类型
自测
题目
P1691 输油管道问题
语言
C++
递交时间
2021-01-28 22:36:59
评测时间
2021-01-28 22:36:59
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes