当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

7047:Link with Balls

题目描述
There were a lot of balls in the factory of Ball Illusion Technology(BIT). Link, a boy, went there to get some balls, but suddenly, he found that there were too many ways to get balls.

There are $2n$ buckets in the factory. Link may get $kx$ balls from the $2x-1^{th}$ bucket, where $k$ is a non-negtive integer. He may also get at most $x$ balls from the $2x^{th}$ bucket.

Link wanted to get $m$ balls, and he wondered how many ways there were to take out exactly $m$ balls. While Link is calculating the answer, he wants you to calculate it as well, and you should output the answer modulo $10^9+7$.
输入解释
The input consists of multiple test cases.

The first line contains an integer $T$ ($1 \leq T \leq 10^5$) -- the number of test cases.

Each test case contains two integers $n$ and $m$($1 \leq n,m \leq 10^6$).
输出解释
For each test case, print the answer modulo $10^9+7$ in a single line.
输入样例
4
1 1
2 2
3 3
1000000 1000000
输出样例
2
6
20
192151600

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-7047

最后修改于 2021-10-23T19:11:12+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 262144/262144K(Java/Others)