# ifndef ONLINE_JUDGE # define _GLIBCXX_DEBUG # endif #include using namespace std; using ll = long long; using vi = vector; using vvi = vector>; using pii = pair; # define rep(i, n) for(int i = 0; i < (int)(n); ++i) # define all(v) v.begin(), v.end() int main(){ constexpr char endl = '\n'; ios::sync_with_stdio(false); cin.tie(nullptr); cout << fixed << setprecision(10); //input(); int N, S, K;cin >> N >> S >> K; //solve(); S -= (N-1)*N/2*K; if(S < 0){ cout << 0 << endl; return 0; } int mod = 1e9+7; //dp[i][j]:=iのj分割の総和 vvi dp(S+1, vi(N+1)); dp[0][0] = 1; for(int i = 0; i <= S; ++i){ for(int j = 1; j <= N; ++j){ if(0 <= i-j) dp[i][j] = dp[i-j][j]+dp[i][j-1]; else dp[i][j] = dp[i][j-1]; dp[i][j] %= mod; } } //output(); cout << dp[S][N] << endl; }