Public Judge

pjudge

Time Limit: 2 s Memory Limit: 512 MB Total points: 100
统计

题目描述

给定正整数 $ n,m\ (n < m) $,称满足以下条件的长度为 $n$ 的整数序列称为好序列:

  • $ 0\leq a_1\leq a_2 \leq \cdots \leq a_n \leq m $。

对于一个好序列 $a$,设将 $(a_1-1,a_2-2,\cdots ,a_n-n)$ 升序排序后的序列为 $f(a)$。

请你对 $k=1,2,\cdots ,n$ 求解以下问题:

  • 求每个好序列的 $f(a)$ 的第 $k$ 大数的和 $\bmod 10^9+7$。

输入格式

输入一行两个正整数 $n,m$。

输出格式

输出 $n$ 行每行一个非负整数,其中第 $i$ 行为 $k=i$ 时的答案。

样例数据

样例输入 1

2 3

样例输出 1

1000000003
4

样例输入 2

3 4

样例输出 2

999999983
0
24

样例输入 3

4 6

样例输出 3

999999887
35
175
330

样例输入 4

10 1000000

样例输出 4

137169236
227221797
992684263
740277343
939871578
109754271
309348506
56941586
822404052
912456613

数据范围

对于全部数据,保证 $1\le n< m < 10^6$。

子任务编号 特殊性质 分值
$1$ $n,m\leq 10$ $10$
$2$ $n,m\leq 100$ $15$
$3$ $n,m\leq 500$ $15$
$4$ $n,m\leq 5000$ $15$
$5$ $m-n\leq 10$ $15$
$6$ $n\le 10$ $15$
$7$ $ $ $15$
About Issues

We understand that our problem archive is not perfect. If you find any issues with the problem, including the statement, scoring configuration, time/memory limits, test cases, etc.

You may use this form to submit an issue regarding the problem. A problem moderator will review your issue and proceed it properly.

STOP! Before you submit an issue, please READ the following guidelines:

  1. This is not a place to publish a discussion, editorial, or requests to debug your code. Your issue will only be visible by you and problem moderators. Other users will not be able to view or reply your issues.
  2. Do not submit duplicated issues. If you have already submitted one, please wait for an moderator to review it. Submitting multiple issues will not speed up the review process and might cause your account to be banned.
  3. Issues must be filed in English or Chinese only.
  4. Be sure your issue is related to this problem. If you need to submit an issue regarding another problem, contest, category, etc., you should submit it to the corresponding page.

Active Issues 0

No issues in this category.

Closed/Resolved Issues 0

No issues in this category.