Borderou de evaluare (job #1237367)

Utilizator Alex_dudeDudescu Alexandru Alex_dude Data 3 octombrie 2014 21:52:47
Problema CMMDC Status done
Runda Arhiva de probleme Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp: In function ‘int rucsac(int, int)’: user.cpp:17:28: error: ‘D’ was not declared in this scope if(g<x[n].g) return D[i-1][j]=rucsac(n-1,g); ^ user.cpp:18:15: error: ‘D’ was not declared in this scope return D[i][j]=max(rucsac(n-1,g)) ^ user.cpp:18:40: error: ‘max’ was not declared in this scope return D[i][j]=max(rucsac(n-1,g)) ^ user.cpp:19:6: error: expected ‘;’ before ‘}’ token } ^ user.cpp:19:6: warning: control reaches end of non-void function [-Wreturn-type] } ^ user.cpp: In function ‘int main()’: user.cpp:24:31: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] fscanf(f,"%d%d",&nr,&gmax); ^ user.cpp:26:37: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] fscanf(f,"%d%d",&x[i].g,&x[i].p); ^

Ceva nu functioneaza?