题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1251 题目大意:Ignatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单词数量(单词本身也是自己的前缀). 本题是一道Tr ...
分类:
其他好文 时间:
2018-12-23 22:13:39
阅读次数:
172
Doing Homework Ignatius has just come back school from the 30th ACM/ICPC. Now he has a lot of homework to do. Every teacher gives him a deadline of ha ...
分类:
其他好文 时间:
2018-12-08 17:05:45
阅读次数:
124
Ignatius and the Princess IV "OK, you are not too bad, em... But you can never pass the next test." feng5166 says. "I will tell you an odd number N, a ...
分类:
其他好文 时间:
2018-12-07 15:58:40
阅读次数:
207
题目:http://acm.hdu.edu.cn/showproblem.php?pid=1028 整数划分,每个数可以用无限次; 所以构造 f(x) = (1+x+x2+x3+...)(1+x2+x4+...)(1+x3+x6+...)...(1+xn) 乘起来后的 xn 的系数就是方案数; 用两 ...
分类:
其他好文 时间:
2018-11-27 12:32:33
阅读次数:
173
题目:http://acm.hdu.edu.cn/showproblem.php?pid=1028 就是可以用任意个1、2、3、...,所以式子写出来就是这样:(1+x+x^2+...)(1+x^2+x^4+...)(1+x^3+x^6+...)...(1+x^n+x^(2*n)+...)... 因 ...
分类:
其他好文 时间:
2018-11-27 12:26:11
阅读次数:
199
老是想着化简,实际上O(n^3)就行了…… 写成生成函数是\\( \prod_{i=1}^{n}(1+x^i+2^{2i}+...+x^{ \left \lfloor \frac{n}{i} \right \rfloor }) \\),暴力乘即可 cpp include include using ...
分类:
其他好文 时间:
2018-11-26 00:14:29
阅读次数:
96
Max Sum Plus Plus Description Now I think you have got an AC in Ignatius.L's "Max Sum" problem. To be a brave ACMer, we always challenge ourselves to ...
分类:
其他好文 时间:
2018-11-23 18:37:43
阅读次数:
195
1004 n^n的末位数字 题目来源: Author Ignatius.L (Hdu 1061) 基准时间限制:1 秒 空间限制:131072 KB 分值: 5 难度:1级算法题 收藏 关注 描述 给出一个整数N,输出N^N(N的N次方)的十进制表示的末位数字。 Input 一个数N(1 inclu ...
分类:
其他好文 时间:
2018-10-22 22:23:40
阅读次数:
186
Ignatius and the Princess IV 链接:http://acm.hdu.edu.cn/showproblem.php?pid=1029 借鉴链接:https://blog.csdn.net/tigerisland45/article/details/52146154 Time ...
分类:
其他好文 时间:
2018-09-16 15:36:04
阅读次数:
194
Ignatius and the Princess III Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 25929 Accepted Subm ...
分类:
其他好文 时间:
2018-08-30 01:59:37
阅读次数:
158