#include #define int long long #define rep(i,a,b) for(int i=(a);i<=(b);i++) #define per(i,a,b) for(int i=(a);i>=(b);i--) #define fi first #define se second #define eb emplace_back #define popc __builtin_popcount using namespace std; typedef long long ll; typedef pair pii; typedef vector vi; typedef vector vp; typedef unsigned long long ull; typedef long double ld; int read() { int x=0,w=1; char c=getchar(); while(!isdigit(c)) {if(c=='-') w=-1; c=getchar();} while(isdigit(c)) {x=x*10+(c-'0'); c=getchar();} return x*w; } const int N=3e5+9,mod=998244353; int m,n,a[N],f[N],fac[N],ifac[N],inv[N],ans,b[N],g[N],x[N],y[N]; vi p; int ksm(int x,int y,int res=1) { for(;y;y>>=1,x=x*x%mod) if(y%2==1) res=res*x%mod; return res; } void pre(int n) { inv[0]=inv[1]=fac[0]=ifac[0]=1; rep(i,1,n) fac[i]=fac[i-1]*i%mod; ifac[n]=ksm(fac[n],mod-2); per(i,n-1,1) ifac[i]=ifac[i+1]*(i+1)%mod; rep(i,2,n) inv[i]=ifac[i]*fac[i-1]%mod; } int C(int x,int y) { if(x<0||y<0||x>1]>>1)|((i&1)<=mod?x-mod:x;} int mns(int x,int y) {return x-=y,x<0?x+=mod:x;} void ntt(int *f,int lim,int t) { rep(i,0,lim-1) if(i0?gg:ig,(mod-1)/(len*2)); for(int i=0;i