题目: 分析:很好,想到了背包,但是初始状态错了??????状态转移是对的。 代码: #include<bits/stdc++.h> using namespace std; int main() { int m,n; cin>>m>>n; int A[m+1]; A[0]