随笔分类 -  动态规划—01背包

摘要:ps:看出是多重背包了,但不会计算方案数。 阅读全文
posted @ 2018-09-19 23:26 天之道,利而不害 阅读(119) 评论(0) 推荐(0) 编辑
摘要:Nick has n bottles of soda left after his birthday. Each bottle is described by two values: remaining amount of soda ai and bottle volume bi (ai ≤ bi) 阅读全文
posted @ 2017-11-19 14:37 天之道,利而不害 阅读(367) 评论(0) 推荐(0) 编辑
摘要:"Fat and docile, big and dumb, they look so stupid, they aren't much fun..." - Cows with Guns by Dana Lyons The cows want to prove to the public that 阅读全文
posted @ 2017-09-02 13:06 天之道,利而不害 阅读(286) 评论(0) 推荐(0) 编辑
摘要:题意:有n首歌,剩余T秒时间,问在结束之前,使得唱的歌的数目尽量多,在此前提下尽量晚的离开KTV。跟多的细节请读Input 题解:如果不考虑数目,则是一道裸的01背包,而现在是数目多的优先,其次再是时间长的优先。所以适合用一个结构体,注意优先级!!! 然后按照01背包的思想做就是了。。。更新值的时候 阅读全文
posted @ 2017-08-05 15:05 天之道,利而不害 阅读(346) 评论(0) 推荐(0) 编辑
摘要:Just to remind, girls in Arpa's land are really nice. Mehrdad wants to invite some Hoses to the palace for a dancing party. Each Hos has some weight w 阅读全文
posted @ 2017-05-22 22:38 天之道,利而不害 阅读(400) 评论(0) 推荐(0) 编辑
摘要: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 t 阅读全文
posted @ 2017-05-06 17:36 天之道,利而不害 阅读(320) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2017-05-04 23:17 天之道,利而不害 阅读(1255) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示