Borderou de evaluare (job #1637694)
Utilizator | Data | 7 martie 2016 18:47:22 | |
---|---|---|---|
Problema | Strabunica | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In function ‘int main()’:
user.cpp:24:51: error: no matching function for call to ‘max(int&, long long int&)’
for(i=1;i<=n;i++) {read(v[i]);maxi=max(v[i],maxi);}
^
user.cpp:24:51: note: candidates are:
In file included from /usr/include/c++/4.8/vector:60:0,
from user.cpp:2:
/usr/include/c++/4.8/bits/stl_algobase.h:216:5: note: template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)
max(const _Tp& __a, const _Tp& __b)
^
/usr/include/c++/4.8/bits/stl_algobase.h:216:5: note: template argument deduction/substitution failed:
user.cpp:24:51: note: deduced conflicting types for parameter ‘const _Tp’ (‘int’ and ‘long long int’)
for(i=1;i<=n;i++) {read(v[i]);maxi=max(v[i],maxi);}
^
In file included from /usr/include/c++/4.8/vector:60:0,
from user.cpp:2:
/usr/include/c++/4.8/bits/stl_algobase.h:260:5: note: template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
/usr/include/c++/4.8/bits/stl_algobase.h:260:5: note: template argument deduction/substitution failed:
user.cpp:24:51: note: deduced conflicting types for parameter ‘const _Tp’ (‘int’ and ‘long long int’)
for(i=1;i<=n;i++) {read(v[i]);maxi=max(v[i],maxi);}
^
user.cpp:22:31: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
{ fread(buff, 1, 20000, stdin);
^
user.cpp: In function ‘void read(int&)’:
user.cpp:10:103: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
while(buff[pos] < '0' || buff[pos] > '9') if(++pos == 20000) fread(buff, 1, 20000, stdin), pos = 0;
^
user.cpp:15:65: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
if(++pos == 20000) fread(buff, 1, 20000, stdin), pos = 0;
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !