#include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; bool rcmp(int a, int b) { return a>b; } typedef long long LL; #define MOD 998244353 #define GGG 3 void assert(int *p) { *p=0; } int expit(LL b, LL m) { LL r=1; while(m) { if (m&1) { r=r*b; r%=MOD; } b=b*b; b%=MOD; m>>=1; } return r; } void fft(int *p, int n, char revert) { if ((MOD-1)%n) assert(0); int rt = expit(GGG, (MOD-1)/n); LL x, y; if (revert) { rt = expit(rt, MOD-2); } int b, i, j, l, t; LL w, ww, v, u, vv; for (i=1, j=0; i>1; for (; j&b; b>>=1) j^=b; j^=b; if (i=MOD) vv-=MOD; p[i+j]=vv; vv=u-v; if (vv<0) vv+=MOD; p[i+j+l/2]=vv; ww*=w; ww%=MOD; } } } if (revert) { x = expit(n, MOD-2); for (i=0; i0&&pbuf1[i]==0) i--; return i; } int ft[100004]; int cs[100004]; int kcs[100004]; int ift[100004]; int pa[200004]; int pb[200004]; int main() { int n, i, m, mx, j, k, c; LL v, r; scanf("%d %d", &m, &n); ft[0]=ift[0]=1; for (i=1; i<=n; i++) { v=ft[i-1]; v*=i; v%=MOD; ft[i]=v; ift[i]=expit(v, MOD-2); } for (i=1; i<=m; i++) cs[i]=0; for (i=0; i