#include #include using namespace std; const long long int mod = 998244353; long long int pow(long long int x,long long int n,long long int mod){ if(n==0){ return 1LL; } if(n%2==0){ long long int p=pow(x,n/2,mod); return p*p%mod; } else{ long long int p=pow(x,n/2,mod); p*=p; p%=mod; p*=x; return p%mod; } } int main() { int H, W, K; cin >> H >> W >> K; H--; W--; K /= 2; vector fact(H + W + 1, 1); for (int i = 1; i <= H + W; ++i) { fact[i] = (fact[i - 1] * i) % mod; } vector fact_inve(H + W + 1, 0); fact_inve[H + W] = pow(fact[H+W],mod-2,mod); for (int i = H + W - 1; i >= 0; --i) { fact_inve[i] = (fact_inve[i + 1] * (i+1)) % mod; } int N = min(H, W); long long ans = 0; if (K <= 600) { vector prev(2 * K + 1, 0); vector dp(2 * K + 1, 0); for (int h = 0; h <= N; ++h) { if (h) { prev = dp; dp = vector(2 * K + 1, 0); } else { dp = vector(2 * K + 1, 0); dp[K] = 1; } for (int w = max(h - K, 0); w <= min(h + K, N); ++w) { if (h && abs((h - 1) - w) <= K) { dp[w - h + K] += prev[w - (h - 1) + K]; } if (w && abs(h - (w - 1)) <= K) { dp[w - h + K] += dp[(w - 1) - h + K]; } dp[w - h + K] %= mod; } ans += fact[H + W] * fact_inve[H - h] % mod * fact_inve[W - h] % mod * fact_inve[2 * h] % mod * dp[K] % mod; ans %= mod; } } else { for (int cnt = 0; cnt <= N; ++cnt) { long long s = (fact[2 * cnt] * fact_inve[cnt]) % mod; for (int i = 1; i <= cnt / (K + 1); ++i) { if (i % 2) { s -= 2 * (fact[2 * cnt] * fact_inve[cnt - (K + 1) * i] * fact_inve[cnt + (K + 1) * i]) % mod; } else { s += 2 * (fact[2 * cnt] * fact_inve[cnt - (K + 1) * i] * fact_inve[cnt + (K + 1) * i]) % mod; } s = (s + mod) % mod; } ans += fact[H + W] * fact_inve[H - cnt] % mod * fact_inve[W - cnt] % mod * fact_inve[2 * cnt] % mod * s % mod; ans %= mod; } } cout << ans << endl; return 0; }