#include #include #include using namespace std; #define RREP(i,s,e) for (i = s; i >= e; i--) #define rrep(i,n) RREP(i,n,0) #define REP(i,s,e) for (i = s; i < e; i++) #define rep(i,n) REP(i,0,n) #define INF 100000000 #define MOD 1000000007 typedef long long ll; int main() { int i, j, n, s, k; int dp[100][20001] {}; cin >> n >> s >> k; s -= n * (n-1) * k / 2; rep (i,s/n+1) dp[0][i*n] = 1; REP (i,1,n) { rep (j,s+1) { dp[i][j] = (dp[i-1][j] + (n-i <= j ? dp[i][j-(n-i)] : 0)) % MOD; } } cout << dp[n-1][s] << endl; return 0; }