摘要: 上题目:296. Sasha vs. KateTime limit per test: 1 second(s)Memory limit: 65536 kilobytesinput: standardoutput: standardDuring the regular Mars's World Finals Subregional Programming Contest a boy Sasha lost N "Mars" bars of chocolate to a girl Kate. But for two years already Sasha does not 阅读全文
posted @ 2013-07-20 23:18 海拉鲁的林克 阅读(339) 评论(0) 推荐(0) 编辑
摘要: 上题目Moving TablesTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 14754Accepted Submission(s): 5039Problem DescriptionThe famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is in the following figure. The floor 阅读全文
posted @ 2013-07-20 22:45 海拉鲁的林克 阅读(303) 评论(0) 推荐(0) 编辑
摘要: 上题目:Fire NetTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4734Accepted Submission(s): 2684Problem DescriptionSuppose that we have a square city with straight streets. A map of a city is a square board with n rows and n columns, each representing 阅读全文
posted @ 2013-07-20 22:24 海拉鲁的林克 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 这东西暂时只看懂了贪心算法的一点,先收藏起来,认识更多的时候再看来源:http://hi.baidu.com/winterlegend/item/dc752c0bf2c18c8c02ce1bad贪心算法与拟阵基础贪心算法是通过一系列的选择来得到问题的最优解。对于每一个决策点,贪心算法所做出的都是当前状态下的最优决策。贪心算法的设计,一般为:1)将优化问题转化为这样的问题,即先做出决策,再解决剩下的一个子问题。2)证明原问题总是有一个最优解是通过贪心得到的,从而说明贪心策略的安全性。(注意这里证明的技巧,是“总是有一个”)3)说明在做出贪心选择后,剩余的子问题具有这样的一个性质:即如果将子问题的 阅读全文
posted @ 2013-07-20 21:58 海拉鲁的林克 阅读(1428) 评论(0) 推荐(0) 编辑
摘要: 上题目Doing Homework againTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4429Accepted Submission(s): 2595Problem DescriptionIgnatius has just come back school from the 30th ACM/ICPC. Now he has a lot of homework to do. Every teacher gives him a deadl 阅读全文
posted @ 2013-07-20 21:32 海拉鲁的林克 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 上题目FatMouse' TradeTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 33316Accepted Submission(s): 10813Problem DescriptionFatMouse prepared M pounds of cat food, ready to trade with the cats guarding the warehouse containing his favorite food, Jav 阅读全文
posted @ 2013-07-20 21:03 海拉鲁的林克 阅读(182) 评论(0) 推荐(0) 编辑