Compile Error
foo.cc:11:1: error: ‘f’ does not name a type 11 | f[mxM+10]; //朴素转移:f[i][j]=max(f[i-1][j], f[i][j-V[i]]+W[i]);现在压缩掉一维空间 | ^ foo.cc: In function ‘int main()’: foo.cc:24:25: error: ‘f’ was not declared in this scope 24 | f[j]=max(f[j],f[j-V[i]]+W[i]); | ^ foo.cc:24:43: error: ‘V’ was not declared in this scope 24 | f[j]=max(f[j],f[j-V[i]]+W[i]); | ^ foo.cc:28:15: error: ‘f’ was not declared in this scope 28 | cout<<f[m]<<endl; | ^
信息
- 递交者
- 类型
- 自测
- 题目
- 完全背包问题
- 语言
- C++
- 递交时间
- 2024-07-18 15:10:23
- 评测时间
- 2024-07-18 15:10:23
- 评测机
- 分数
- 0
- 总耗时
- 0ms
- 峰值内存
- 0 Bytes