Borderou de evaluare (job #2031471)

Utilizator Valentin0709Datcu George Valentin Valentin0709 Data 3 octombrie 2017 11:26:33
Problema Joc13 Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘int apel(int, int)’: user.cpp:41:1: warning: no return statement in function returning non-void [-Wreturn-type] } ^ user.cpp: In function ‘int main()’: user.cpp:73:22: warning: suggest parentheses around comparison in operand of ‘&’ [-Wparentheses] for(z=j;z>=j-k+2&z>=1;z--) prec[i][j]+=a[i][j]; ^ user.cpp:73:50: error: incompatible types in assignment of ‘int’ to ‘int [11]’ for(z=j;z>=j-k+2&z>=1;z--) prec[i][j]+=a[i][j]; ^ user.cpp:78:25: error: no matching function for call to ‘max()’ a[i][j]=max(); ^ user.cpp:78:25: note: candidates are: In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from user.cpp:1: /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:78:25: note: candidate expects 2 arguments, 0 provided a[i][j]=max(); ^ In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from user.cpp:1: /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:78:25: note: candidate expects 3 arguments, 0 provided a[i][j]=max(); ^ user.cpp:45:27: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] fscanf(f,"%d%d",&n,&k); ^ user.cpp:47:50: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] for(j=1;j<=n;j++) fscanf(f,"%d",&a[i][j]); ^

Ceva nu functioneaza?