// No.269 見栄っ張りの募金活動 // 分割数による解法 #include using namespace std; typedef long long ll; // const int INF = 2147483647; // const ll INF = 9223372036854775807; // modint: mod 計算を int を扱うように扱える構造体 template struct ModInt { long long val; constexpr ModInt(long long v = 0) noexcept : val(v % MOD) { if (val < 0) val += MOD; } constexpr int getmod() { return MOD; } constexpr ModInt operator - () const noexcept { return val ? MOD - val : 0; } constexpr ModInt operator + (const ModInt& r) const noexcept { return ModInt(*this) += r; } constexpr ModInt operator - (const ModInt& r) const noexcept { return ModInt(*this) -= r; } constexpr ModInt operator * (const ModInt& r) const noexcept { return ModInt(*this) *= r; } constexpr ModInt operator / (const ModInt& r) const noexcept { return ModInt(*this) /= r; } constexpr ModInt& operator += (const ModInt& r) noexcept { val += r.val; if (val >= MOD) val -= MOD; return *this; } constexpr ModInt& operator -= (const ModInt& r) noexcept { val -= r.val; if (val < 0) val += MOD; return *this; } constexpr ModInt& operator *= (const ModInt& r) noexcept { val = val * r.val % MOD; return *this; } constexpr ModInt& operator /= (const ModInt& r) noexcept { long long a = r.val, b = MOD, u = 1, v = 0; while (b) { long long t = a / b; a -= t * b; swap(a, b); u -= t * v; swap(u, v); } val = val * u % MOD; if (val < 0) val += MOD; return *this; } constexpr bool operator == (const ModInt& r) const noexcept { return this->val == r.val; } constexpr bool operator != (const ModInt& r) const noexcept { return this->val != r.val; } friend constexpr ostream& operator << (ostream &os, const ModInt& x) noexcept { return os << x.val; } friend constexpr ModInt modpow(const ModInt &a, long long n) noexcept { if (n == 0) return 1; auto t = modpow(a, n / 2); t = t * t; if (n & 1) t = t * a; return t; } }; const int MOD = 1000000007; using mint = ModInt; // 分割数 template struct Partition { vector> P; constexpr Partition(int N_MAX, int K_MAX) noexcept : P(N_MAX + 1, vector(K_MAX + 1, 0)) { for (int k = 0; k <= K_MAX; k++) P[0][k] = 1; for (int n = 1; n <= N_MAX; n++) { for (int k = 1; k <= K_MAX; k++) { P[n][k] = P[n][k-1] + (n-k >= 0 ? P[n-k][k] : 0); } } } constexpr T get(int n, int k) { if (n < 0 || k < 0) return 0; return P[n][k]; } }; int main() { int N, S, K; cin >> N >> S >> K; ll fixed = 0; for (int i=1; i