生成函数这个东西太好用了~ code: #include <bits/stdc++.h> #define ll long long #define setIO(s) freopen(s".in","r",stdin) using namespace std; const int mod=998244353,G=3,N=1000003; int A[N],B[N],F[N],g[N],inv2,C[N],D[N],tmp1[N]; inline int q…
思路: RT //By SiriusRen #include <bits/stdc++.h> using namespace std; <<,mod=; int A[N],C[N],invC[N],c[N],d[N],R[N],tmp[N],xx,len,sqrA[N],F[N]; typedef long long ll; int power(ll x,int y){ ll res=; while(y){ )res=res*x%mod; x=x*x%mod,y>>=;…