Borderou de evaluare (job #1893010)

Utilizator danysilas23Silas Daniel danysilas23 Data 25 februarie 2017 14:01:30
Problema Lacusta 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:25:30: warning: format ‘%hd’ expects argument of type ‘short int*’, but argument 2 has type ‘short int (*)[251]’ [-Wformat=] scanf("%hd",&a[j]); ^ user.cpp:26:14: warning: overflow in implicit constant conversion [-Woverflow] dp[2][1] = INF; ^ user.cpp:29:15: error: incompatible types in assignment of ‘short int*’ to ‘short int [251]’ dp[1] = dp[1][1] + a[1]; ^ user.cpp:31:28: error: invalid operands of types ‘short int [251]’ and ‘short int [251]’ to binary ‘operator+’ dp[2] = dp[1] + a[2]; ^ user.cpp:48:23: error: incompatible types in assignment of ‘short int*’ to ‘short int [251]’ dp[j] = a[j] + a[i - 1][j] + minim1; ^ user.cpp:50:23: error: incompatible types in assignment of ‘short int*’ to ‘short int [251]’ dp[j] = a[j] + a[i - 1][j] + minim2; ^ user.cpp:55:24: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] if(minim > dp[n]) ^ user.cpp:56:25: error: invalid conversion from ‘short int*’ to ‘int’ [-fpermissive] minim = dp[n]; ^ user.cpp:20:36: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("lacusta.in","r",stdin); ^ user.cpp:21:38: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] freopen("lacusta.out","w",stdout); ^ user.cpp:22:26: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%hd%hd",&n,&m); ^ user.cpp:25:31: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%hd",&a[j]); ^

Ceva nu functioneaza?