Borderou de evaluare (job #1205838)
| Utilizator | Data | 8 iulie 2014 11:45:21 | |
|---|---|---|---|
| Problema | Statistici de ordine | Status | done |
| Runda | Arhiva educationala | Compilator | cpp | Vezi sursa |
| Scor | 0 | ||
Raport evaluator
Eroare de compilare:
user.cpp: In function ‘int main()’:
user.cpp:20:43: error: no matching function for call to ‘nth_element(std::vector<int>::iterator, std::vector<int>::iterator, int&)’
int res = nth_element(begin(v), end(v), k);
^
user.cpp:20:43: note: candidates are:
In file included from /usr/include/c++/4.8/algorithm:62:0,
from user.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:5384:5: note: template<class _RAIter> void std::nth_element(_RAIter, _RAIter, _RAIter)
nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth,
^
/usr/include/c++/4.8/bits/stl_algo.h:5384:5: note: template argument deduction/substitution failed:
user.cpp:20:43: note: deduced conflicting types for parameter ‘_RAIter’ (‘__gnu_cxx::__normal_iterator<int*, std::vector<int> >’ and ‘int’)
int res = nth_element(begin(v), end(v), k);
^
In file included from /usr/include/c++/4.8/algorithm:62:0,
from user.cpp:1:
/usr/include/c++/4.8/bits/stl_algo.h:5423:5: note: template<class _RAIter, class _Compare> void std::nth_element(_RAIter, _RAIter, _RAIter, _Compare)
nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth,
^
/usr/include/c++/4.8/bits/stl_algo.h:5423:5: note: template argument deduction/substitution failed:
user.cpp:20:43: note: deduced conflicting types for parameter ‘_RAIter’ (‘__gnu_cxx::__normal_iterator<int*, std::vector<int> >’ and ‘int’)
int res = nth_element(begin(v), end(v), k);
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !
