随笔分类 - ACM--背包问题
摘要:You have a long drive by car ahead. You have a tape recorder, but unfortunately your best music is onCDs. You need to have it on tapes so the problem
阅读全文
摘要:紫书P274题意:输入N首歌曲和最后剩余的时间t,问在保证能唱的歌曲数目最多的情况下,时间最长;最后必唱《劲歌金曲》所以就在最后一秒唱劲歌金曲就ok了,背包容量是t-1,来装前面的歌曲,设两个Time求时间,cnt是数量#include #include #include #include usin...
阅读全文
摘要:http://acm.fzu.edu.cn/problem.php?pid=2214Accept: 4Submit: 6Time Limit: 3000 mSecMemory Limit : 32768 KBProblem DescriptionGiven a set of n items, eac...
阅读全文
摘要:http://acm.tju.edu.cn/toj/showp3540.html3540.ConsumerTime Limit:2.0 Seconds Memory Limit:65536KTotal Runs:136 Accepted Runs:67FJ is going to do some s...
阅读全文
摘要:A Mini LocomotiveTime Limit: 1000MSMemory Limit: 30000KTotal Submissions: 2485Accepted: 1388DescriptionA train has a locomotive that pulls the train w...
阅读全文
摘要:I love sneakers! Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4765 Accepted Submission(s): 195
阅读全文
摘要:Charlie's ChangeTime Limit:1000MSMemory Limit:30000KTotal Submissions:3720Accepted:1125DescriptionCharlie is a driver of Advanced Cargo Movement, Ltd....
阅读全文
摘要:Space ElevatorTime Limit:1000MSMemory Limit:65536KTotal Submissions:9970Accepted:4738DescriptionThe cows are going to space! They plan to achieve orbi...
阅读全文
摘要:题目描述 金明今天很开心,家里购置的新房就要领钥匙了,新房里有一间金明自己专用的很宽敞的房间。更让他高兴的是,妈妈昨天对他说:“你的房间需要购买哪些物品,怎么布置,你说了算,只要不超过N元钱就行”。今天一早,金明就开始做预算了,他把想买的物品分为两类:主件与附件,附件是从属于某个主件的,下表就是一...
阅读全文
摘要:ACboy needs your helpTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5589Accepted Submission(s): 3...
阅读全文
摘要:Coins Time Limit: 3000MS Memory Limit: 30000K Total Submissions: 32309 Accepted: 10986 Description People in Silverland use coins.They have coins of v
阅读全文
摘要:背包之前了解的太肤浅了,最近又重新看了一遍,记录一下理解的心得:参考:http://www.cppblog.com/tanky-woo/archive/2010/07/31/121803.htmlhttp://blog.csdn.net/wumuzi520/article/details/70212...
阅读全文