#include #include using namespace std; using namespace atcoder; typedef long long ll; using mint=modint998244353; const int log2NMAX=14; int main(){ int N,M,K; cin>>N>>M>>K; vector> X(log2NMAX+1,vector(0)); vector>> Y(log2NMAX+1,vector>(0)); X[0].assign(2*M+1,1); X[0][M-K]=0; X[0][M+K]=0; for(int i=0;i(1,1)); } Y[log2NMAX][1]=X[log2NMAX]; vector t(log2NMAX+3,0); t[1]=1; for(int i=2;i=0;i--){ for(int j=0;j<(int)(Y[i+1].size());j++){ Y[i][j<<1]=Y[i+1][j]; Y[i][(j<<1)+1]=convolution(Y[i+1][j],X[i]); vector Z((t[i+1]-1)*2*M+1); if(Y[i][j<<1].size()>=Z.size()){ for(int k=0;k<(int)(Z.size());k++){ Z[k]=Y[i][j<<1][(Y[i][j<<1].size()>>1)+k-(Z.size()>>1)]; } Y[i][j<<1]=Z; }if(Y[i][(j<<1)+1].size()>=Z.size()){ for(int k=0;k<(int)(Z.size());k++){ Z[k]=Y[i][(j<<1)+1][(Y[i][(j<<1)+1].size()>>1)+k-(Z.size()>>1)]; } Y[i][(j<<1)+1]=Z; } } } mint ANS=0; mint P=2*M-1; if(K==0){ P+=1; } mint V=P.pow(N); mint W=P.inv(); mint U=1; for(int i=1;i<=N;i++){ V*=W; U*=P; ANS+=(U-Y[0][i][0])*V*(N-i+1); } cout<<(ANS/2).val()<<"\n"; }