#include // cin, cout, cerr, clog #include // minmax, sort, swap #include // iota, accumulate, inner_product #include // printf, scanf #include // INT_MIN, LLONG_MIN #include // long, trig, pow #include // string, stoi, to_string #include // vector #include // queue, priority_queue #include // deque #include // stack #include // key-value pairs sorted by keys #include // set #include // hashed by keys #include // hashed by keys #include // cout< // std::function #define rep(i,n) for(int i = 0; i < (n); i++) #define ENDL '\n' #define print(i) std::cout << (i) << '\n' #define int long long // at least int64 > 9*10^18 #define all(v) (v).begin(), (v).end() #define dump2(v) for(auto i:v) { for(auto j:i) std::cout << j << ' '; std::cout << "\n"; } constexpr int MOD = 1e9+7; struct mint { int v; mint():v(0){} mint(int v):v((v+MOD)%MOD){} mint operator-()const{ return mint(0) - *this;} mint& operator+=(const mint& a){ if((v+=a.v)>=MOD) v-=MOD; return *this;} mint& operator-=(const mint& a){ if((v+=MOD-a.v)>=MOD) v-=MOD; return *this;} mint& operator*=(const mint& a){ (v*=a.v)%=MOD; return *this;} mint& operator/=(const mint& a){ (*this) *= a.inv(); return *this;} mint operator+(const mint& a)const{ return mint(*this) += a;} mint operator-(const mint& a)const{ return mint(*this) -= a;} mint operator*(const mint& a)const{ return mint(*this) *= a;} mint operator/(const mint& a)const{ return mint(*this) /= a;} bool operator<(const mint& a)const{ return v < a.v;} bool operator==(const mint& a)const{ return v == a.v;} mint pow(int k)const{mint r(1),t(v);while(k){if(k&1)r*=t;t*=t;k>>=1;} return r;} mint inv()const{return pow(MOD-2);} }; std::istream& operator>>(std::istream&i,mint&a){int t;i>>t;a=mint(t);return i;} std::ostream& operator<<(std::ostream&o,const mint&a){o<> n >> s >> k; s -= k*(n-1)*n/2; if(s<0) { print(0); return 0; } std::vector > dp(n+1,std::vector(s+1,0)); dp[0][0] = 1; rep(i,n) { rep(j,s+1) { int c = 0; while(j+(n-i)*c<=s) { dp[i+1][j+(n-i)*c] += dp[i][j]; c++; } } } print(dp[n][s]); return 0; }