#include #include using namespace std; const long long MOD = 1000000007; int main(){ int N, d, K; cin >> N >> d >> K; vector> dp(N + 1, vector(N * d + 2, 0)); dp[0][0] = 1; for (int i = 0; i < N; i++){ for (int j = 0; j <= i * d; j++){ dp[i + 1][j + 1] += dp[i][j]; dp[i + 1][j + d + 1] += MOD - dp[i][j]; } for (int j = 0; j <= (i + 1) * d; j++){ dp[i + 1][j + 1] += dp[i + 1][j]; dp[i + 1][j + 1] %= MOD; } } cout << dp[N][K] << endl; }