摘要: 【题目】 http://acm.hdu.edu.cn/showproblem.php?pid=4704【报告】 S(K)显然就是N的K正整数划分数。所以SUM{S(K),1> n) { n[n.length()-1]--; ... 阅读全文
posted @ 2013-08-26 14:19 为美好世界献上珂学 阅读(146) 评论(0) 推荐(0)
摘要: 【题目】http://acm.hdu.edu.cn/showproblem.php?pid=1018【报告】 首先,暴力模拟是绝对会TLE的。。然后看了别人的题解,发现有个斯特林公式(Stirling'sapproximation): 或更精确的 ... 阅读全文
posted @ 2013-08-26 13:18 为美好世界献上珂学 阅读(150) 评论(0) 推荐(0)
摘要: 【题目】http://acm.hdu.edu.cn/showproblem.php?pid=1016【报告】 素数环问题,要求相邻两个数的和是素数。 标准的暴力DFS问题,注意一下N=1的特殊情况。如果预处理出素数表,素数表要到做到40(因为Nn... 阅读全文
posted @ 2013-08-26 12:29 为美好世界献上珂学 阅读(123) 评论(0) 推荐(0)