#include #include #define Maxn 1000500const double Pi=acos(-1);using namespace std;int n,m,r[Maxn<<2];struct complex{complex(double xx=0,double yy=0){x=xx,y=yy;}double x,y;};complex operator + (complex a,complex b){ return complex(a.x+b.x,a.y+b.y);}complex operator - (complex a,complex b){ return complex(a.x-b.x,a.y-b.y);}complex operator * (complex a,complex b){ return complex(a.x*b.x-a.y*b.y,a.x*b.y+a.y*b.x);}complex b[Maxn<<2],c[Maxn<<2];void fft(complex *f,short op){ for (int i=0;i >1]>>1)|((i&1)?n>>1:0); fft(b,1); fft(c,1);//DFT for(int i=0;i