Borderou de evaluare (job #3201885)
Utilizator | Data | 10 februarie 2024 09:29:12 | |
---|---|---|---|
Problema | Statistici de ordine | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:24:29: error: no matching function for call to 'nth_element(std::vector<int>::iterator, std::vector<int>::iterator, int&)'
24 | fout << std::nth_element(numbers.begin(), numbers.end(), k);
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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:4732:5: note: candidate: 'template<class _RAIter> constexpr void std::nth_element(_RAIter, _RAIter, _RAIter)'
4732 | nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth,
| ^~~~~~~~~~~
/usr/include/c++/12.2.1/bits/stl_algo.h:4732:5: note: template argument deduction/substitution failed:
main.cpp:24:29: note: deduced conflicting types for parameter '_RAIter' ('__gnu_cxx::__normal_iterator<int*, std::vector<int> >' and 'int')
24 | fout << std::nth_element(numbers.begin(), numbers.end(), k);
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/12.2.1/bits/stl_algo.h:4772:5: note: candidate: 'template<class _RAIter, class _Compare> constexpr void std::nth_element(_RAIter, _RAIter, _RAIter, _Compare)'
4772 | nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth,
| ^~~~~~~~~~~
/usr/include/c++/12.2.1/bits/stl_algo.h:4772:5: note: template argument deduction/substitution failed:
main.cpp:24:29: note: deduced conflicting types for parameter '_RAIter' ('__gnu_cxx::__normal_iterator<int*, std::vector<int> >' and 'int')
24 | fout << std::nth_element(numbers.begin(), numbers.end(), k);
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/12.2.1/algorithm:73:
/usr/include/c++/12.2.1/pstl/glue_algorithm_defs.h:400:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::nth_element(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare)'
400 | nth_element(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __nth,
| ^~~~~~~~~~~
/usr/include/c++/12.2.1/pstl/glue_algorithm_defs.h:400:1: note: template argument deduction/substitution failed:
main.cpp:24:29: note: deduced conflicting types for parameter '_RandomAccessIterator' ('__gnu_cxx::__normal_iterator<int*, std::vector<int> >' and 'int')
24 | fout << std::nth_element(numbers.begin(), numbers.end(), k);
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/12.2.1/pstl/glue_algorithm_defs.h:405:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::nth_element(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator)'
405 | nth_element(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __nth,
| ^~~~~~~~~~~
/usr/include/c++/12.2.1/pstl/glue_algorithm_defs.h:405:1: note: template argument deduction/substitution failed:
main.cpp:24:29: note: deduced conflicting types for parameter '_RandomAccessIterator' ('__gnu_cxx::__normal_iterator<int*, std::vector<int> >' and 'int')
24 | fout << std::nth_element(numbers.begin(), numbers.end(), k);
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !