#pragma GCC optimize("Ofast") #pragma GCC target("avx2") char*mmap(); char wbuf[1<<25]; #define rd_skip() while(*rp++>=48) #define rd_skip_line() while(*rp++!=10) #define rd(v) long v=0;{long _c;while(_c=*rp++-48,_c>=0)v=v*10+_c;} #define WTHI(v) {long _z=v,_n=0,_d=0;while(++_n,_d=_d<<8|0x30|_z%10,_z/=10);*(long*)wp=_d;wp+=_n;} #define WTLO(v) {long _z=v,_n=8,_d=0;while(_d=_d<<8|0x30|_z%10,_z/=10,--_n);*(long*)wp=_d;wp+=8;} #define wt(v) if(v>=100000000){*wp++=v/100000000+48;WTLO(v);}else{WTHI(v);} unsigned d[4001][4001]; #define MD 998244353 void f0(){ for(long x=0;x<=4000;++x){ d[0][x]=1; } for(long y=1;y<=4000;++y){ d[y][0]=1; for(long x=1;x<=4000;++x){ long a=d[y-1][x-1]*2; a-=a