Borderou de evaluare (job #2232528)
Utilizator | Data | 19 august 2018 20:51:38 | |
---|---|---|---|
Problema | Elimin | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In function ‘void check()’:
user.cpp:16:32: error: no matching function for call to ‘nth_element(short int*, short int*, bool (&)(short int, short int))’
nth_element(o+1, o+m+1, cmp);
^
In file included from /usr/include/c++/6/algorithm:62:0,
from user.cpp:2:
/usr/include/c++/6/bits/stl_algo.h:4621:5: note: candidate: template<class _RAIter> void std::nth_element(_RAIter, _RAIter, _RAIter)
nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth,
^~~~~~~~~~~
/usr/include/c++/6/bits/stl_algo.h:4621:5: note: template argument deduction/substitution failed:
user.cpp:16:32: note: deduced conflicting types for parameter ‘_RAIter’ (‘short int*’ and ‘bool (*)(short int, short int)’)
nth_element(o+1, o+m+1, cmp);
^
In file included from /usr/include/c++/6/algorithm:62:0,
from user.cpp:2:
/usr/include/c++/6/bits/stl_algo.h:4660:5: note: candidate: template<class _RAIter, class _Compare> void std::nth_element(_RAIter, _RAIter, _RAIter, _Compare)
nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth,
^~~~~~~~~~~
/usr/include/c++/6/bits/stl_algo.h:4660:5: note: template argument deduction/substitution failed:
user.cpp:16:32: note: deduced conflicting types for parameter ‘_RAIter’ (‘short int*’ and ‘bool (*)(short int, short int)’)
nth_element(o+1, o+m+1, cmp);
^
user.cpp: In function ‘int main()’:
user.cpp:41:37: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
freopen("elimin.in", "r", stdin);
^
user.cpp:42:39: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
freopen("elimin.out", "w", stdout);
^
user.cpp:43:45: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%hi %hi %hi %hi", &m, &n, &r, &c);
^
user.cpp:48:39: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%hi", &a[j][i]);
^
user.cpp:53:39: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%hi", &a[i][j]);
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !