/*    ∫ ∫ ∫    ノヽ   (_  )  (_    ) (______ )  ヽ(´・ω・)ノ     |  /    UU */ #pragma region macro #include typedef long long int64; using namespace std; using P = pair; typedef vector vi; const int MOD = (int)1e9 + 7; const int64 INF = 1LL << 62; const int inf = 1<<30; templatebool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (b ostream& operator<<(ostream& os, vector &V){ int N = V.size(); REP(i,N){ os << V[i]; if (i!=N-1) os << " "; } os << "\n"; return os; } template ostream& operator<<(ostream& os, pair const&P){ os << "("; os << P.first; os << " , "; os << P.second; os << ")"; return os; } template ostream& operator<<(ostream& os, set &S){ auto it=S.begin(); while(it!=S.end()){ os << *it; os << " "; it++; } os << "\n"; return os; } template ostream& operator<<(ostream& os, deque &q){ for(auto it=q.begin();it> dxdy = {mp(0,1),mp(1,0),mp(-1,0),mp(0,-1)}; #pragma endregion //fixed< bit; for(b=b;b>0;b>>=1){ bit.push_back(b&1); } vector fac(bit.size()); fac[0] = a; int64 res = 1; for(int i=1;i= MOD) x -= MOD; return *this; } mint& operator-=(const mint a) { if ((x += MOD-a.x) >= MOD) x -= MOD; return *this; } mint& operator*=(const mint a) { (x *= a.x) %= MOD; return *this; } mint operator+(const mint a) const { mint res(*this); return res+=a; } mint operator-(const mint a) const { mint res(*this); return res-=a; } mint operator*(const mint a) const { mint res(*this); return res*=a; } mint pow(int64 t) const { if (!t) return 1; mint a = pow(t>>1); a *= a; if (t&1) a *= *this; return a; } // for prime MOD mint inv() const { return pow(MOD-2); } mint& operator/=(const mint a) { return (*this) *= a.inv(); } mint operator/(const mint a) const { mint res(*this); return res/=a; } }; ostream& operator<<(ostream& os, mint a){ os << a.x; return os; } //写像12相 n個をkグループに //区別できないボール/区別できない箱/制限なし 分割数 mint ball_10(int n,int r){ vector> P(n+1,vector(r+1,0)); REP(j,r+1) P[0][j]=1; for(int i=1;i<=n;i++){ for(int j=1;j<=r;j++){ P[i][j] = P[i][j-1]; //0を含む if (i-j>=0) P[i][j] += P[i-j][j]; //0を含まない } } return P[n][r]; } int main(){ cin.tie(0); ios::sync_with_stdio(false); int64 N,S,K; cin >> N >> S >> K; S -= N*K*(N-1)/2; if (S<0) { cout << 0 << bn; return 0; } auto ans = ball_10(S,N); cout << ans << endl; }