13 vector<vector<T>> g(n2*2,{1});
14 for(
int i=0; i<n; i++) g[n2+i]={-x[i],1};
15 for(ll i=n2-1; i>0; i--) g[i]=PolyMul(g[i<<1],g[i<<1|1]);
18 vector<T> diff=PolyDifferential(prod),eval=MultipointEvaluate(diff,x);
20 using P=pair<vector<T>,vector<T>>;
21 vector<P> g2(n2*2,{{0},{1}});
22 for(
int i=0; i<n; i++) g2[n2+i]={{y[i]},{-eval[i]*x[i],eval[i]}};
23 auto merge=[](P l, P r)-> P {
24 vector<T> tmp1=PolyMul(l.first,r.second),tmp2=PolyMul(l.second,r.first);
25 return {PolyAdd(tmp1,tmp2),PolyMul(l.second,r.second)};
27 for(ll i=n2-1; i>0; i--) g2[i]=merge(g2[i<<1],g2[i<<1|1]);
29 vector<T> ret=g2[1].first;
31 for(
int i=0; i<n; i++) p*=eval[i];
33 for(
int i=0; i<n; i++) ret[i]*=p;