#include using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); const long long MOD = 1000000007; int n, s, k; cin >> n >> s >> k; if (s >= n * (n - 1) * k / 2) s -= n * (n - 1) * k / 2; else { cout << 0 << "\n"; return 0; } vector< vector > dp(n + 1, vector(s + 1,0)); dp[0][0] = 1; for(int i = 1; i <= n; i++) { for(int j = 0; j <= s; j++) { for(int t = 0; t * (n - i + 1) <= j; t++) { dp[i][j] += dp[i - 1][j - (n - i + 1) * t]; dp[i][j] %= MOD; } } } cout << dp[n][s] << "\n"; return 0; }