#include #include #include using namespace std; using namespace atcoder; using mint = modint998244353; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf32 1000000001 #define Inf64 1000000000000000000LL struct combi{ deque kaijou; deque kaijou_; combi(int n){ kaijou.push_back(1); for(int i=1;i<=n;i++){ kaijou.push_back(kaijou[i-1]*i); } mint b=kaijou[n].inv(); kaijou_.push_front(b); for(int i=1;i<=n;i++){ int k=n+1-i; kaijou_.push_front(kaijou_[0]*k); } } mint combination(int n,int r){ if(r>n)return 0; mint a = kaijou[n]*kaijou_[r]; a *= kaijou_[n-r]; return a; } mint junretsu(int a,int b){ mint x = kaijou_[a]*kaijou_[b]; x *= kaijou[a+b]; return x; } mint catalan(int n){ return combination(2*n,n)/(n+1); } }; combi C(1000000); int main(){ int N,M,K; cin>>N>>M>>K; vector pows(M+2,vector(M+2,0)); rep(i,M+2){ pows[i][0] = 1; rep(j,M+1){ pows[i][j+1] = pows[i][j]*i; } } vector dp(M+2,vector(M+2,0)); dp[0][0] = 1; rep(i,M+2){ rep(j,M+2){ for(int k=j+1;k<=M+1;k++){ int tm = min(K,k); tm = tm - j; tm = max(tm,0); if(i!=M+1){ dp[i+1][k] += dp[i][j] * pows[k][tm]; } } } } vector ddp(M+1,0); for(int i=1;i<=M;i++){ ddp[i] = mint(i).pow(N); for(int j=1;j