摘要:
题目地址:http://poj.org/problem?id=1028DescriptionStandard web browsers contain features to move backward and forward among the pages recently visited. One way to implement these features is to use two stacks to keep track of the pages that can be reached by moving backward and forward. In this problem, 阅读全文
摘要:
题目链接http://acm.hdu.edu.cn/showproblem.php?pid=1846其他类型:http://hi.baidu.com/lydrainbowcat/item/6649d5f3422be2b630c19938所谓巴什博弈,是ACM题中最简单的组合游戏,大致上是这样的:只有一堆n个物品,两个人轮流从这堆物品中取物,规定每次至少取1个,最多取m个,最后取光者得胜。显然,如果n = m + 1,那么由于一次最多只能取m个,所以,无论先取者拿走多少个,后取者都能够一次拿走剩余的物品,后者取胜。因此我们发现了如何取胜的法则:如果 n = (m + 1) * r + s ,(r 阅读全文
摘要:
题目链接http://acm.hdu.edu.cn/showproblem.php?pid=1789Doing Homework againTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4877Accepted Submission(s): 2852Problem DescriptionIgnatius has just come back school from the 30th ACM/ICPC. Now he has a lot of 阅读全文