#include //#include// //#include// using namespace std; //using namespace __gnu_pbds;// #define int long long int #define fastio ios_base::sync_with_stdio(false);cin.tie(nullptr); cout.tie(nullptr); #define endl '\n' #define fo(i,x,n) for(int i=x; i<=n;i++) #define rfo(i,n,x) for(int i=n; i>=x;i--) #define kill(x) cout< #define vii vector #define vi vector #define vvi vector> #define mod 1000000007 #define FILL(x,v) memset(x, v, sizeof(x)) #define PI 3.14159265358979323846 #define INF LLONG_MAX //9.223372e+18 //typedef tree,rb_tree_tag,tree_order_statistics_node_update> ordered_set;// struct custom_hash { static uint64_t splitmix64(uint64_t x) { x += 0x9e3779b97f4a7c15; x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9; x = (x ^ (x >> 27)) * 0x94d049bb133111eb; return x ^ (x >> 31); } size_t operator()(uint64_t x) const { static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count(); return splitmix64(x + FIXED_RANDOM); } }; #ifndef ONLINE_JUDGE #define debug(x) cerr << #x << " " << x << endl; #else #define debug(x) #endif void _print(int t) {cerr << t;} void _print(string t) {cerr << t;} void _print(char t) {cerr << t;} void _print(double t) {cerr << t;} template void _print(pair p); template void _print(vector v); template void _print(set v); template void _print(map v); template void _print(multiset v); template void _print(pair p) {cerr << "{"; _print(p.ff); cerr << ","; _print(p.ss); cerr << "}";} template void _print(vector v) {cerr << "[ "; for (T i : v) {_print(i); cerr << " ";} cerr << "]";} template void _print(set v) {cerr << "[ "; for (T i : v) {_print(i); cerr << " ";} cerr << "]";} template void _print(multiset v) {cerr << "[ "; for (T i : v) {_print(i); cerr << " ";} cerr << "]";} template void _print(map v) {cerr << "[ "; for (auto i : v) {_print(i); cerr << " ";} cerr << "]";} templateostream&operator<<(ostream&out,const pair&a){return out<<"("<ostream&operator<<(ostream&out,const vector&a){for(const A &it:a)out<istream&operator>>(istream&in,pair&a){return in>>a.first>>a.second;} templateistream&operator>>(istream&in,vector&a){for(A &i:a)in>>i;return in;} int gcd(int a,int b){ return (b==0) ? a : gcd(b,a%b); } int32_t main(){ fastio //cout<>t; while(t--){ int n,s,k; cin>>n>>s>>k; // P(S−(K+2K+⋯+(N- 1) K), N). int q = (n*(n-1))/2; q*=k; s -= q; vector> dp(s+1,vector (n+1,0)); dp[0][0] = 1; fo(i,1,s){ fo(j,1,n){ dp[i][j] += dp[i-1][j-1]; dp[i][j] %=mod; if(i>=j){ dp[i][j] += dp[i-j][j]; dp[i][j] %=mod; } } } int ans = 0 ; fo(i,1,n){ ans += dp[s][i]; ans %= mod; } cout<