- 博客(2)
- 收藏
- 关注
转载 0-1背包
状态转移方程为 dp[i][j]=max(dp[i-1][j],dp[i-1][j-c[i]]+w[i]); dp[i][j]表示i个物品放入容积为j的背包的最大价值量 ,dp[i-1][j]表示不放入物品i,dp[i-1][j-c[i]]+w[i]表示放入i 。 //状态转移方程为 dp[i][j]=max(dp[i-1][j],dp[i-1][j-c[i]]+w[i]); #in...
2015-12-08 23:31:00
61
转载 UVA455 - Periodic Strings(周期串)
题目:Periodic Strings A character string is said to have period k if it can be formed by concatenating one or more repetitions of another string of length k. For example, the string "abcabcabcabc" ...
2015-12-01 23:35:00
89
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人