Wrong Answer
/in/foo.cc: In function 'int main()':
/in/foo.cc:11:47: warning: array subscript -1 is below array bounds of 'int [1005]' [-Warray-bounds]
11 | dp[i]=max(dp[j],dp[j-i]+a[i]);
| ~~~~~~^
/in/foo.cc:3:15: note: while referencing 'dp'
3 | int n,a[1005],dp[1005],ans;
| ^~
信息
- 递交者
- 类型
- 递交
- 题目
- P2955 学习小组
- 语言
- C++
- 递交时间
- 2026-11-29 09:47:28
- 评测时间
- 2026-11-29 09:47:28
- 评测机
- 分数
- 20
- 总耗时
- 18ms
- 峰值内存
- 548.0 KiB