摘要: 1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4 #include <cmath> 5 #include <algorithm> 6 using namespace std; 7 const int maxn=40000 阅读全文
posted @ 2016-09-16 23:48 oyzx~ 阅读(133) 评论(0) 推荐(0) 编辑
摘要: FFT实质上做的是循环卷积,ck=sigam(ai*bj,(i+j)%n=k),其中n是倍长后的长度,所以我们有时候需要的只是普通的卷积,我们就需要把原数组倍长,再用FFT求卷积,由于高位都是0,所以做出来就等价于普通的卷积。 阅读全文
posted @ 2016-09-16 23:39 oyzx~ 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4 #include <cmath> 5 #include <algorithm> 6 using namespace std; 7 const int maxn=40000 阅读全文
posted @ 2016-09-16 23:36 oyzx~ 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4 #include <algorithm> 5 #include <cmath> 6 using namespace std; 7 const double PI=acos 阅读全文
posted @ 2016-09-16 23:32 oyzx~ 阅读(124) 评论(0) 推荐(0) 编辑