HDU - 1028 step 1:初始化第一个多项式 也就是 由 1的各种方案 组 成 的多项式 初始化系数为 1。临时区 temp初始化 为 0 step 2:遍历后续的n - 1 个 多项式 ,第二重 for j 代 表 的 存 储 结 果 的 多 项 式的次数,k 代表 当前 第 i 的 多 ...
分类:
其他好文 时间:
2019-01-13 01:46:13
阅读次数:
158
"Ignatius and the Princess II" Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 11536 Accepted Su ...
分类:
其他好文 时间:
2019-01-13 00:07:46
阅读次数:
232
题意 给定两个长度为n的由小写字母组成的字符串 每次可以花费1的代价,指定两个字母,把其中一个全部变为另一个 求使两个字符串相同的最小花费 n define R register define fp(i,a,b) for(R int i=a,I=b+1;iI; i) define go(u) for ...
分类:
其他好文 时间:
2019-01-03 10:59:16
阅读次数:
178
Mario is world-famous plumber. His “burly” figure and amazing jumping ability reminded in our memory. Now the poor princess is in trouble again and Ma ...
分类:
其他好文 时间:
2018-12-15 10:26:16
阅读次数:
227
昨天晚上一顿折腾终于装好了Manjaro,觉得有必要写篇博客记录一下以免重装的时候没有参考。 坎坷的安装过程 遇到的第一个问题在于启动盘。。。在win10下烧启动盘,最开始用的是Universal USB Installer,结果BIOS启动一直黑屏,UEFI启动grub rescue???? 然后 ...
分类:
编程语言 时间:
2018-12-10 20:51:46
阅读次数:
2242
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
Unit 1 sincere 真诚的,真挚的 mood 心情, 情绪 static 静的,静态的,静止的,停滞的,静电 senator 参议员 senate 参议院 hobby 业余爱好,癖好 lad 男孩, 小伙子 equip 装备,配备 frown 皱眉 software 软件 fasten 扎 ...
分类:
其他好文 时间:
2018-11-20 00:00:41
阅读次数:
218