奇数的为,偶数为
考虑枚举奇数的个数
对于可以单独算
否则暴力二项式展开后是一个卷积的形式
直接算即可
#include<bits/stdc++.h>
using namespace std;
#define re register
#define ll long long
#define pb push_back
#define cs const
#define bg begin
#define pii pair<int,int>
#define fi first
#define se second
#define poly vector<int>
cs int RLEN=1<<20|1;
inline char gc(){
static char ibuf[RLEN],*ib,*ob;
(ib==ob)&&(ob=(ib=ibuf)+fread(ibuf,1,RLEN,stdin));
return (ib==ob)?EOF:*ib++;
}
inline int read(){
char ch=gc();
int res=0,f=1;
while(!isdigit(ch))f^=ch=='-',ch=gc();
while(isdigit(ch))res=(res+(res<<2)<<1)+(ch^48),ch=gc();
return f?res:-res;
}
inline ll readl(){
char ch=gc();
ll res=0;bool f=1;
while(!isdigit(ch))f^=ch=='-',ch=gc();
while(isdigit(ch))res=(res+(res<<2)<<1)+(ch^48),ch=gc();
return f?res:-res;
}
template<class tp>inline void chemx(tp &a,tp b){a<b?a=b:0;}
template<class tp>inline void chemn(tp &a,tp b){a>b?a=b:0;}
cs int mod=998244353,G=3;
inline int add(int a,int b){a+=b-mod;return a+(a>>31&mod);}
inline void Add(int &a,int b){a+=b-mod,a+=a>>31&mod;}
inline int dec(int a,int b){a-=b;return a+(a>>31&mod);}
inline void Dec(int &a,int b){a-=b,a+=a>>31&mod;}
inline int mul(int a,int b){static ll r;r=1ll*a*b;return r>=mod?r%mod:r;}
inline void Mul(int &a,int b){static ll r;r=1ll*a*b,a=r>=mod?r%mod:r;}
inline int ksm(int a,int b,int res=1){for(;b;b>>=1,Mul(a,a))(b&1)&&(Mul(res,a),1);return res;}
inline int Inv(int x){return ksm(x,mod-2);}
cs int N=100005;
poly w[19];
int rev[(1<<18)|5];
inline void init_w(){
cs int C=18;
for(int i=1;i<=C;i++)w[i].resize(1<<(i-1));
int wn=ksm(G,(mod-1)/(1<<C));
w[C][0]=1;
for(int i=1;i<(1<<(C-1));i++)w[C][i]=mul(w[C][i-1],wn);
for(int i=C-1;i;i--)
for(int j=0;j<(1<<(i-1));j++)w[i][j]=w[i+1][j<<1];
}
inline void init_rev(int lim){
for(int i=0;i<lim;i++)rev[i]=(rev[i>>1]>>1)|((i&1)*(lim>>1));
}
inline void ntt(poly &f,int lim,int kd){
for(int i=0;i<lim;i++)if(i>rev[i])swap(f[i],f[rev[i]]);
for(int mid=1,l=1,a0,a1;mid<lim;mid<<=1,l++)
for(int i=0;i<lim;i+=(mid<<1))
for(int j=0;j<mid;j++)
a0=f[i+j],a1=mul(f[i+j+mid],w[l][j]),f[i+j]=add(a0,a1),f[i+j+mid]=dec(a0,a1);
if(kd==-1){
reverse(f.bg()+1,f.bg()+lim);
for(int i=0,iv=Inv(lim);i<lim;i++)Mul(f[i],iv);
}
}
inline poly operator *(poly a,poly b){
int deg=a.size()+b.size()-1,lim=1;
while(lim<deg)lim<<=1;
init_rev(lim);
a.resize(lim),ntt(a,lim,1);
b.resize(lim),ntt(b,lim,1);
for(int i=0;i<lim;i++)Mul(a[i],b[i]);
ntt(a,lim,-1),a.resize(deg);return a;
}
int fac[N],ifac[N];
inline void init_inv(){
fac[0]=ifac[0]=1;
for(int i=1;i<N;i++)fac[i]=mul(fac[i-1],i);
ifac[N-1]=Inv(fac[N-1]);
for(int i=N-2;i;i--)ifac[i]=mul(ifac[i+1],i+1);
}
inline int C(int n,int m){
return n<m?0:mul(fac[n],mul(ifac[m],ifac[n-m]));
}
int d,n,m;
int main(){
#ifdef Stargazer
freopen("lx.cpp","r",stdin);
#endif
init_w(),init_inv();
d=read(),n=read(),m=read();
int lim=n-2*m;
poly f(d+1,0),g(d+1,0);
for(int i=0;i<=d;i++){
if(i<=lim&&lim-i<=d){
f[i]=mul(ifac[i],ifac[lim-i]);
if((lim-i)&1)f[i]=dec(0,f[i]);
}
if(d>=1+lim+i)g[i]=mul(ifac[i],ifac[d-1-lim-i]);
}
f=f*g;
int res=0;
for(int i=0;i<d;i++)Add(res,mul(mul(C(d,i),ksm(((2*i-d)%mod+mod)%mod,n)),mul(mul(fac[i],fac[d-1-i]),f[i])));
for(int i=0;i<=min(lim,d);i++)Add(res,mul(C(d,i),ksm(d,n)));
cout<<mul(Inv(ksm(2,d)),res);
}