#include #define debug(x) cerr << #x << ": " << x << '\n'; using namespace std; using ll = long long; using P = pair; const int INF = (int)1e9; const int MOD = (int)1e9 + 7; // fatorial.cpp depend on this. #ifndef MOD_INT #define MOD_INT template struct ModInt{ private: int x; public: ModInt() : x(0){} ModInt(int64_t y) : x(y >= 0 ? y % mod : (mod - (-y) % mod) % mod){} ModInt &operator+=(const ModInt &p){ if((x += p.x) >= mod) x -= mod; return *this; } ModInt &operator-=(const ModInt &p){ if((x += mod - p.x) >= mod) x -= mod; return *this; } ModInt &operator*=(const ModInt &p){ x = (int) (1LL * x * p.x % mod); return *this; } ModInt &operator/=(const ModInt &p){ *this *= p.inverse(); return *this; } ModInt operator-() const {return ModInt(-x);} ModInt operator+(const ModInt &p) const {return ModInt(*this) += p;} ModInt operator-(const ModInt &p) const {return ModInt(*this) -= p;} ModInt operator*(const ModInt &p) const {return ModInt(*this) *= p;} ModInt operator/(const ModInt &p) const {return ModInt(*this) /= p;} bool operator==(const ModInt &p) const {return x == p.x;} bool operator!=(const ModInt &p) const {return x != p.x;} bool operator<(const ModInt &p) const {return x < p.x;} void operator=(const int &p){x = p >= 0 ? p % mod : (mod - (-p) % mod) % mod;} template operator T() const {return (T)x;} ModInt inverse() const { int a = x, b = mod, u = 1, v = 0, t; while(b > 0) { t = a / b; swap(a -= t * b, b); swap(u -= t * v, v); } return ModInt(u); } ModInt pow(int64_t n) const { ModInt ret(1), mul(x); while(n > 0) { if(n & 1) ret *= mul; mul *= mul; n >>= 1; } return ret; } friend ostream &operator<<(ostream &os, const ModInt &p){ return os << p.x; } friend istream &operator>>(istream &is, ModInt &a){ int64_t t; is >> t; a = ModInt< mod >(t); return (is); } static int get_mod(){return mod;} }; using mint = ModInt; #endif mint dp[20001][101]; int N, S, K; int main(void){ cin >> N >> S >> K; int M = S - N * (N-1) * K / 2; for(int i = 0; i <= M; i++){ for(int j = 0; j <= N; j++){ dp[i][j] = 0; } } if(M < 0){ cout << "0\n"; return 0; } dp[0][0] = 1; for(int j = 0; j <= N; j++){ for(int i = 0; i <= M; i++){ if(j-1 >= 0) dp[i][j] += dp[i][j-1]; if(i-j >= 0 and i != 0) dp[i][j] += dp[i-j][j]; // printf("dp(%d, %d) = ", i, j); // cout << dp[i][j] << '\n'; } } cout << dp[M][N] << '\n'; return 0; }