Borderou de evaluare (job #2157277)

Utilizator PopoviciRobertPopovici Robert PopoviciRobert Data 9 martie 2018 14:38:50
Problema Sudest Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 100

Raport evaluator

Compilare: user.cpp: In function ‘int main()’: user.cpp:23:40: warning: format ‘%d’ expects argument of type ‘int*’, but argument 3 has type ‘char*’ [-Wformat=] fscanf(fi,"%d " ,&mat[i][j]); ^ user.cpp:28:31: warning: format ‘%d’ expects argument of type ‘int*’, but argument 3 has type ‘char*’ [-Wformat=] fscanf(fi,"%d " ,&v[i]); ^ user.cpp:35:41: warning: suggest parentheses around ‘-’ in operand of ‘&’ [-Wparentheses] if(i - v[p] > 0 && dp[1 - p & 1][i - v[p]][j] > 0) { ^ user.cpp:36:74: warning: suggest parentheses around ‘-’ in operand of ‘&’ [-Wparentheses] dp[p & 1][i][j] = max(dp[p & 1][i][j], (short) (dp[1 - p & 1][i - v[p]][j] + mat[i][j])); ^ user.cpp:39:41: warning: suggest parentheses around ‘-’ in operand of ‘&’ [-Wparentheses] if(j - v[p] > 0 && dp[1 - p & 1][i][j - v[p]] > 0) { ^ user.cpp:40:74: warning: suggest parentheses around ‘-’ in operand of ‘&’ [-Wparentheses] dp[p & 1][i][j] = max(dp[p & 1][i][j], (short) (dp[1 - p & 1][i][j - v[p]] + mat[i][j])); ^ user.cpp:20:25: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] fscanf(fi,"%d " ,&n); ^ user.cpp:23:41: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] fscanf(fi,"%d " ,&mat[i][j]); ^ user.cpp:26:25: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] fscanf(fi,"%d " ,&k); ^ user.cpp:28:32: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] fscanf(fi,"%d " ,&v[i]); ^
Test Timp executie Memorie folosita Mesaj Punctaj/test
10ms1288kbOKAY!10
20ms1296kbOKAY!10
30ms1304kbOKAY!10
40ms1308kbOKAY!10
50ms1320kbOKAY!10
60ms1320kbOKAY!10
74ms1308kbOKAY!10
84ms1324kbOKAY!10
916ms1516kbOKAY!10
100ms1276kbOKAY!10
Punctaj total100

Ceva nu functioneaza?