HDU 4704 Sum(隔板原理+组合数求和公式+费马小定理+快速幂)
摘要:题目传送:http://acm.hdu.edu.cn/showproblem.php?pid=4704 Problem Description Sample Input 2 2 Sample Output 2 Hint 1. For N = 2, S(1) = S(2) = 1. 2. The in
阅读全文
HDU 1205 吃糖果(想想题)
摘要:题目传送:http://acm.hdu.edu.cn/showproblem.php?pid=1205 Problem Description HOHO,终于从Speakless手上赢走了所有的糖果,是Gardon吃糖果时有个特殊的癖好,就是不喜欢将一样的糖果放在一起吃,喜欢先吃一种,下一次吃另一种
阅读全文
HDU 5776 sum(抽屉原理)
摘要:题目传送:http://acm.hdu.edu.cn/showproblem.php?pid=5776 Problem Description Given a sequence, you're asked whether there exists a consecutive subsequence
阅读全文
HDU 1808 Halloween treats(抽屉原理)
摘要:题目传送:http://acm.hdu.edu.cn/showproblem.php?pid=1808 Problem Description Every year there is the same problem at Halloween: Each neighbour is only will
阅读全文