苹果 01背包
摘要:#include #include #include using namespace std; int main() { int n,v,c[1003],w[1003]; int dp[1003]; //滚动数组 dp数组表示重量为i时价值为多少。。 while(scanf("%d%d",&n,&v),(n||v)) { ...
阅读全文
posted @ 2016-05-30 21:31