摘要: 窝不会dp啊。。。 fft貌似写的炸空间了。。。 还是暴力吧。。。 1 #include <iostream> 2 #include <algorithm> 3 #include <cstdio> 4 #include <cstring> 5 #include <cstdlib> 6 #includ 阅读全文
posted @ 2017-02-10 14:02 KingSann 阅读(96) 评论(0) 推荐(0) 编辑
摘要: 卷积计数。 将所有面值的硬币写成多项式形式,用系数表示硬币个数,用指数表示硬币面值,则卷积一遍后系数相加,相同系数的式子累积,则再扫一遍后第一个系数为0的位置的系数便是答案。 1 #include <iostream> 2 #include <algorithm> 3 #include <cstdi 阅读全文
posted @ 2017-02-10 10:36 KingSann 阅读(114) 评论(0) 推荐(0) 编辑