摘要:
和 0 - 1 背包的区别是每种物品可以选任意多个。dp[i+1][j] = 从前 i 种物品中挑选总重量不超过 j 时总重量的最大值。递推关系为:dp[0][j] = 0dp[i+1][j] = max{ dp[i][j - k*w[i]] + k*v[i] | ... 阅读全文
posted @ 2018-04-11 23:25
ACLJW
阅读(104)
评论(0)
推荐(0)
摘要:
UVa - 512 Spreadsheet Tracking思路1:首先模拟操作,算出最后的电子表格,然后在每次查询时直接在电子表格中找到所求的单元格。#include#includeusing namespace std;const int maxn = 100,b... 阅读全文
posted @ 2018-04-11 20:42
ACLJW
阅读(188)
评论(0)
推荐(0)
摘要:
Some message encoding schemes require that an encoded message be sent in two parts. The first part, called the header, contains the ch... 阅读全文
posted @ 2018-04-11 10:18
ACLJW
阅读(204)
评论(0)
推荐(0)

浙公网安备 33010602011771号