Language: C++

#include<iostream>
#include<cstdio>
#include<algorithm>
#define FOR(i,a,b) for(int i=a;i<=b;i++)
#define FOF(i,a,b) for(int i=a;i< b;i++)
#define ROF(i,a,b) for(int i=a;i>=b;i--)
using namespace std;
const int N=100100,P=998244353;
int n,m,L,o,ans;
int fc[N],vf[N],iv[N],rv[N],W[N],a[N],b[N],f[N];
int qpw(int x,int y){int z=1;for(;y;y>>=1,x=1ll*x*x%P)if(y&1) z=1ll*z*x%P;return z;}
int C(int x,int y){return 1ll*fc[x]*vf[x-y]%P*vf[y]%P;}
void ini(int n){
	for(L=1,o=0;L<=n;L<<=1,o++);
	FOF(i,1,L) rv[i]=rv[i>>1]>>1|(i&1)<<(o-1);
	iv[1]=fc[0]=vf[0]=1;
	FOR(i,2,L) iv[i]=1ll*iv[P%i]*(P-P/i)%P;
	FOR(i,1,L) fc[i]=1ll*fc[i-1]*i%P,vf[i]=1ll*vf[i-1]*iv[i]%P;
	int W1=qpw(3,(P-1)>>o);W[L>>1]=1;
	FOF(i,(L>>1)+1,L) W[i]=1ll*W[i-1]*W1%P;
	ROF(i,(L>>1)-1,0) W[i]=W[i<<1];
}
void DFT(int *A,int L){
	static unsigned long long B[N];
	FOF(i,0,L) B[i]=A[rv[i]];
	for(int i=1,t;i<L;i<<=1)for(int j=0,s=i<<1;j<L;j+=s)FOF(k,0,i)
		t=B[i+j+k]*W[i+k]%P,B[i+j+k]=B[j+k]+P-t,B[j+k]+=t;
	FOF(i,0,L) A[i]=B[i]%P;
}
void IFT(int *A,int L){
	reverse(A+1,A+L);DFT(A,L);
	int nv=P-(P-1)/L;
	FOF(i,0,L) A[i]=1ll*A[i]*nv%P;
}
void work(){
	FOF(i,0,L) a[i]=i<=n?1ll*f[i]*vf[i]%P:0;
	FOF(i,0,L) b[i]=i<=n?vf[i+2]:0;
	DFT(a,L);DFT(b,L);
	FOF(i,0,L) a[i]=1ll*a[i]*b[i]%P;IFT(a,L);
	FOR(i,0,n) f[i]=(1ll*fc[i+2]*a[i]-1ll*i*f[i]+P)%P;
}
int main(){
	freopen("1.in","r",stdin);
	scanf("%d%d",&n,&m);
	ini(n<<1);f[0]=1;
	FOR(i,1,m) work();
	FOR(i,0,n) (ans+=1ll*C(n,i)*f[i]%P)%=P;
	cout<<ans<<'\n';
}#include<iostream>
#include<cstdio>
#include<algorithm>
#define FOR(i,a,b) for(int i=a;i<=b;i++)
#define FOF(i,a,b) for(int i=a;i< b;i++)
#define ROF(i,a,b) for(int i=a;i>=b;i--)
using namespace std;
const int N=100100,P=998244353;
int n,m,L,o,ans;
int fc[N],vf[N],iv[N],rv[N],W[N],a[N],b[N],f[N];
int qpw(int x,int y){int z=1;for(;y;y>>=1,x=1ll*x*x%P)if(y&1) z=1ll*z*x%P;return z;}
int C(int x,int y){return 1ll*fc[x]*vf[x-y]%P*vf[y]%P;}
void ini(int n){
	for(L=1,o=0;L<=n;L<<=1,o++);
	FOF(i,1,L) rv[i]=rv[i>>1]>>1|(i&1)<<(o-1);
	iv[1]=fc[0]=vf[0]=1;
	FOR(i,2,L) iv[i]=1ll*iv[P%i]*(P-P/i)%P;
	FOR(i,1,L) fc[i]=1ll*fc[i-1]*i%P,vf[i]=1ll*vf[i-1]*iv[i]%P;
	int W1=qpw(3,(P-1)>>o);W[L>>1]=1;
	FOF(i,(L>>1)+1,L) W[i]=1ll*W[i-1]*W1%P;
	ROF(i,(L>>1)-1,0) W[i]=W[i<<1];
}
void DFT(int *A,int L){
	static unsigned long long B[N];
	FOF(i,0,L) B[i]=A[rv[i]];
	for(int i=1,t;i<L;i<<=1)for(int j=0,s=i<<1;j<L;j+=s)FOF(k,0,i)
		t=B[i+j+k]*W[i+k]%P,B[i+j+k]=B[j+k]+P-t,B[j+k]+=t;
	FOF(i,0,L) A[i]=B[i]%P;
}
void IFT(int *A,int L){
	reverse(A+1,A+L);DFT(A,L);
	int nv=P-(P-1)/L;
	FOF(i,0,L) A[i]=1ll*A[i]*nv%P;
}
void work(){
	FOF(i,0,L) a[i]=i<=n?1ll*f[i]*vf[i]%P:0;
	FOF(i,0,L) b[i]=i<=n?vf[i+2]:0;
	DFT(a,L);DFT(b,L);
	FOF(i,0,L) a[i]=1ll*a[i]*b[i]%P;IFT(a,L);
	FOR(i,0,n) f[i]=(1ll*fc[i+2]*a[i]-1ll*i*f[i]+P)%P;
}
int main(){
	//freopen("1.in","r",stdin);
	scanf("%d%d",&n,&m);
	ini(n<<1);f[0]=1;
	FOR(i,1,m) work();
	FOR(i,0,n) (ans+=1ll*C(n,i)*f[i]%P)%=P;
	cout<<ans<<'\n';
}

Compiler output:
a.cc:49:2: error: stray '#' in program
   49 | }#include<iostream>
      |  ^
a.cc:49:3: error: 'include' does not name a type
   49 | }#include<iostream>
      |   ^~~~~~~
a.cc:56:11: error: redefinition of 'const int N'
   56 | const int N=100100,P=998244353;
      |           ^
a.cc:8:11: note: 'const int N' previously defined here
    8 | const int N=100100,P=998244353;
      |           ^
a.cc:56:20: error: redefinition of 'const int P'
   56 | const int N=100100,P=998244353;
      |                    ^
a.cc:8:20: note: 'const int P' previously defined here
    8 | const int N=100100,P=998244353;
      |                    ^
a.cc:57:5: error: redefinition of 'int n'
   57 | int n,m,L,o,ans;
      |     ^
a.cc:9:5: note: 'int n' previously declared here
    9 | int n,m,L,o,ans;
      |     ^
a.cc:57:7: error: redefinition of 'int m'
   57 | int n,m,L,o,ans;
      |       ^
a.cc:9:7: note: 'int m' previously declared here
    9 | int n,m,L,o,ans;
      |       ^
a.cc:57:9: error: redefinition of 'int L'
   57 | int n,m,L,o,ans;
      |         ^
a.cc:9:9: note: 'int L' previously declared here
    9 | int n,m,L,o,ans;
      |         ^
a.cc:57:11: error: redefinition of 'int o'
   57 | int n,m,L,o,ans;
      |           ^
a.cc:9:11: note: 'int o' previously declared here
    9 | int n,m,L,o,ans;
      |           ^
a.cc:57:13: error: redefinition of 'int ans'
   57 | int n,m,L,o,ans;
      |             ^~~
a.cc:9:13: note: 'int ans' previously declared here
    9 | int n,m,L,o,ans;
      |             ^~~
a.cc:58:5: error: redefinition of 'int fc [100100]'
   58 | int fc[N],vf[N],iv[N],rv[N],W[N],a[N],b[N],f[N];
      |     ^~
a.cc:10:5: note: 'int fc [100100]' previously declared here
   10 | int fc[N],vf[N],iv[N],rv[N],W[N],a[N],b[N],f[N];
      |     ^~
a.cc:58:11: error: redefinition of 'int vf [100100]'
   58 | int fc[N],vf[N],iv[N],rv[N],W[N],a[N],b[N],f[N];
      |           ^~
a.cc:10:11: note: 'int vf [100100]' previously declared here
   10 | int fc[N],vf[N],iv[N],rv[N],W[N],a[N],b[N],f[N];
      |           ^~
a.cc:58:17: error: redefinition of 'int iv [100100]'
   58 | int fc[N],vf[N],iv[N],rv[N],W[N],a[N],b[N],f[N];
      |                 ^~
a.cc:10:17: note: 'int iv [100100]' previously declared here
   10 | int fc[N],vf[N],iv[N],rv[N],W[N],a[N],b[N],f[N];
      |                 ^~
a.cc:58:23: error: redefinition of 'int rv [100100]'
   58 | int fc[N],vf[N],iv[N],rv[N],W[N],a[N],b[N],f[N];
      |                       ^~
a.cc:10:23: note: 'int rv [100100]' previously declared here
   10 | int fc[N],vf[N],iv[N],rv[N],W[N],a[N],b[N],f[N];
      |                       ^~
a.cc:58:29: error: redefinition of 'int W [100100]'
   58 | int fc[N],vf[N],iv[N],rv[N],W[N],a[N],b[N],f[N];
      |                             ^
a.cc:10:29: note: 'int W [100100]' previously declared here
   10 | int fc[N],vf[N],iv[N],rv[N],W[N],a[N],b[N],f[N];
      |                             ^
a.cc:58:34: error: redefinition of 'int a [100100]'
   58 | int fc[N],vf[N],iv[N],rv[N],W[N],a[N],b[N],f[N];
      |                                  ^
a.cc:10:34: note: 'int a [100100]' previously declared here
   10 | int fc[N],vf[N],iv[N],rv[N],W[N],a[N],b[N],f[N];
      |                                  ^
a.cc:58:39: error: redefinition of 'int b [100100]'
   58 | int fc[N],vf[N],iv[N],rv[N],W[N],a[N],b[N],f[N];
      |                                       ^
a.cc:10:39: note: 'int b [100100]' previously declared here
   10 | int fc[N],vf[N],iv[N],rv[N],W[N],a[N],b[N],f[N];
      |                                       ^
a.cc:58:44: error: redefinition of 'int f [100100]'
   58 | int fc[N],vf[N],iv[N],rv[N],W[N],a[N],b[N],f[N];
      |                                            ^
a.cc:10:44: note: 'int f [100100]' previously declared here
   10 | int fc[N],vf[N],iv[N],rv[N],W[N],a[N],b[N],f[N];
      |                                            ^
a.cc:59:5: error: redefinition of 'int qpw(int, int)'
   59 | int qpw(int x,int y){int z=1;for(;y;y>>=1,x=1ll*x*x%P)if(y&1) z=1ll*z*x%P;return z;}
      |     ^~~
a.cc:11:5: note: 'int qpw(int, int)' previously defined here
   11 | int qpw(int x,int y){int z=1;for(;y;y>>=1,x=1ll*x*x%P)if(y&1) z=1ll*z*x%P;return z;}
      |     ^~~
a.cc:60:5: error: redefinition of 'int C(int, int)'
   60 | int C(int x,int y){return 1ll*fc[x]*vf[x-y]%P*vf[y]%P;}
      |     ^
a.cc:12:5: note: 'int C(int, int)' previously defined here
   12 | int C(int x,int y){return 1ll*fc[x]*vf[x-y]%P*vf[y]%P;}
      |     ^
a.cc:61:6: error: redefinition of 'void ini(int)'
   61 | void ini(int n){
      |      ^~~
a.cc:13:6: note: 'void ini(int)' previously defined here
   13 | void ini(int n){
      |      ^~~
a.cc:71:6: error: redefinition of 'void DFT(int*, int)'
   71 | void DFT(int *A,int L){
      |      ^~~
a.cc:23:6: note: 'void DFT(int*, int)' previously defined here
   23 | void DFT(int *A,int L){
      |      ^~~
a.cc:78:6: error: redefinition of 'void IFT(int*, int)'
   78 | void IFT(int *A,int L){
      |      ^~~
a.cc:30:6: note: 'void IFT(int*, int)' previously defined here
   30 | void IFT(int *A,int L){
      |      ^~~
a.cc:83:6: error: redefinition of 'void work()'
   83 | void work(){
      |      ^~~~
a.cc:35:6: note: 'void work()' previously defined here
   35 | void work(){
      |      ^~~~
a.cc:90:5: error: redefinition of 'int main()'
   90 | int main(){
      |     ^~~~
a.cc:42:5: note: 'int main()' previously defined here
   42 | int main(){
      |     ^~~~