#include #include int main() { std::uint_fast32_t map[20001] = { 1 }; std::uint_fast32_t map_tmp[20001] = { 1 }; int n, maney, k; std::cin >> n >> maney >> k; maney -= (n - 1)*n/2*k; for (int i = 0; i <= maney; i++) { map[i] = 1; } std::cout << maney << std::endl; for (int i = 1; i < n ; i++) { for (int j = 0; j <= maney; j++) { int now_maney = j; std::uint_fast32_t count = 0; while (now_maney >= 0) { count += map[now_maney]; if (count > 1000000007) { count -= 1000000007; } now_maney -= i + 1; } map_tmp[j] = count; } for (int j = 0; j <= maney; j++) { map[j] = map_tmp[j]; } } std::cout << map[maney] << std::endl; }