1658: 小球放盒子

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

有N个相同的球,M个不同的盒子,每个盒子最多放K个球
请计算将这N个球全部放入盒子中的方案数模1000007后的结果

Input

三个正整数,依次为N,M,K

Output

输出方案数模1000007后的结果

Sample Input Copy

4 2 3

Sample Output Copy

3

HINT

总共有3种方案,依次为 { 3 , 1 },{ 2 , 2 },{ 1 , 3 }。 对于100%的数据, N,M ≤ 5000

Source/Category