dp入门
文章平均质量分 70
JooooohnDoe
自己选择的路,跪着也要走完
展开
-
dp入门
dp入门经典——01背包问题(1) Bone Collector Many years ago , in Teddy’s hometown there was a man who was called “Bone Collector”. This man like to collect varies of bones , such as dog’s , cow’s ,原创 2017-01-14 22:53:26 · 322 阅读 · 0 评论 -
dp入门(2)
dp入门经典——01背包问题(2) 饭卡 电子科大本部食堂的饭卡有一种很诡异的设计,即在购买之前判断余额。如果购买一个商品之前,卡上的剩余金额大于或等于5元,就一定可以购买成功(即使购买后卡上余额为负),否则无法购买(即使金额足够)。所以大家都希望尽量使卡上的余额最少。 某天,食堂中有n种菜出售,每种菜可购买一次。已知每种菜的价格以及卡上的余额,问最少可使卡上的余原创 2017-01-14 23:03:23 · 303 阅读 · 0 评论 -
dp入门(3)
dp入门经典——01背包(3) Robberies The aspiring Roy the Robber has seen a lot of American movies, and knows that the bad guys usually gets caught in the end, often because they become too greedy. H原创 2017-01-15 17:07:21 · 360 阅读 · 0 评论