0_0_19507230_31534.cpp: In function 'int main()':
0_0_19507230_31534.cpp:18:12: error: invalid types 'int[int]' for array subscript
f[0]=0;
^
0_0_19507230_31534.cpp:20:16: error: invalid types 'int[int]' for array subscript
f[i]=30000000;
^
0_0_19507230_31534.cpp:23:20: error: invalid types 'int[int]' for array subscript
f[j]=max(f[j],f[j-w[i]]+p[i]);
^
0_0_19507230_31534.cpp:23:29: error: invalid types 'int[int]' for array subscript
f[j]=max(f[j],f[j-w[i]]+p[i]);
^
0_0_19507230_31534.cpp:23:39: error: invalid types 'int[int]' for array subscript
f[j]=max(f[j],f[j-w[i]]+p[i]);
^
0_0_19507230_31534.cpp:26:15: error: invalid types 'int[int]' for array subscript
if(f[m]!=30000000) cout<<"The minimum amount of money in the piggy-bank is "<<f[m]<<'.'<<endl;//为什么f[m]不会被更新?
^
0_0_19507230_31534.cpp:26:90: error: invalid types 'int[int]' for array subscript
if(f[m]!=30000000) cout<<"The minimum amount of money in the piggy-bank is "<<f[m]<<'.'<<endl;//为什么f[m]不会被更新?
^
|