用Bluestein’s Algorithm DFT #include <cstdio> #include <iostream> #include <algorithm> #include <cmath> #include <ctime> #include <assert.h> using namespace std; const int N=300010; int n,r,pp[N]; inline int Prime(int p){ for(int i=2;i*i<=p;i++) if(p%i==0) return 0...
Bluestein's AlgorithmBluestein's Algorithm实际上就是用卷积来实现DFTDFT,时间复杂度O(nlogn)O(nlogn)。 #include <bits/stdc++.h> #define show(x) cerr << #x << " = " << x << endl using namespace std; typedef long long ll; typedef pair<int, int> Pairs; typedef complex<double>...
DO NOT CHECK OUT THESE FILES FROM GITHUB UNLESS YOU KNOW WHAT YOU ARE DOING. (See below.) - fftw3/dft/bluestein.c at master · ct-clmsn/fftw3