Borderou de evaluare (job #3191665)
Utilizator | Data | 10 ianuarie 2024 12:23:57 | |
---|---|---|---|
Problema | Subsir crescator maximal | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int LIS_mine()':
main.cpp:30:26: error: no matching function for call to 'binary_search(std::vector<int>&, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&)'
30 | ans[binary_search(v,v[i])+1]=v[i];
| ~~~~~~~~~~~~~^~~~~~~~
In file included from /usr/include/c++/12.2.1/algorithm:61,
from /usr/include/c++/12.2.1/x86_64-pc-linux-gnu/bits/stdc++.h:65,
from main.cpp:1:
/usr/include/c++/12.2.1/bits/stl_algo.h:2225:5: note: candidate: 'template<class _FIter, class _Tp> constexpr bool std::binary_search(_FIter, _FIter, const _Tp&)'
2225 | binary_search(_ForwardIterator __first, _ForwardIterator __last,
| ^~~~~~~~~~~~~
/usr/include/c++/12.2.1/bits/stl_algo.h:2225:5: note: template argument deduction/substitution failed:
main.cpp:30:26: note: deduced conflicting types for parameter '_FIter' ('std::vector<int>' and 'int')
30 | ans[binary_search(v,v[i])+1]=v[i];
| ~~~~~~~~~~~~~^~~~~~~~
/usr/include/c++/12.2.1/bits/stl_algo.h:2259:5: note: candidate: 'template<class _FIter, class _Tp, class _Compare> constexpr bool std::binary_search(_FIter, _FIter, const _Tp&, _Compare)'
2259 | binary_search(_ForwardIterator __first, _ForwardIterator __last,
| ^~~~~~~~~~~~~
/usr/include/c++/12.2.1/bits/stl_algo.h:2259:5: note: template argument deduction/substitution failed:
main.cpp:30:26: note: deduced conflicting types for parameter '_FIter' ('std::vector<int>' and 'int')
30 | ans[binary_search(v,v[i])+1]=v[i];
| ~~~~~~~~~~~~~^~~~~~~~
main.cpp:6:5: note: candidate: 'int binary_search(int)'
6 | int binary_search(int x){
| ^~~~~~~~~~~~~
main.cpp:6:5: note: candidate expects 1 argument, 2 provided
main.cpp: In function 'int main()':
main.cpp:41:15: error: too many arguments to function 'int LIS_mine()'
41 | cout<<LIS_mine(v);
| ~~~~~~~~^~~
main.cpp:21:5: note: declared here
21 | int LIS_mine(){
| ^~~~~~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !