QOJ.ac

QOJ

実行時間制限: 2 s メモリ制限: 1024 MB 満点: 100

#6460. 山峰场景

統計

一位艺术家从一卷一英寸宽的丝带开始。她将其剪成各种整数长度的片段,然后将它们与框架的底部对齐,垂直排列在列中,以形成一个山景。山景必须是不平坦的;如果所有列的高度都相同,则它是平原场景,而不是山景!她可能不会用完所有的丝带。

如果我们的艺术家有 4 英寸的丝带和一个 $2 \times 2$ 英寸的框架,她可以形成这些场景:

她不会形成这些场景,因为它们是平原,而不是山脉!

给定丝带的长度以及框架的宽度和高度(单位均为英寸),她可以创造出多少种不同的山景?如果丝带覆盖的区域不同,则两个场景被视为不同。在任何一列中放置超过一段丝带是没有意义的。

输入格式

输入由单个测试用例组成。请注意,您的程序可能会在不同的输入上运行多次。输入由一行包含三个空格分隔的整数 $n$、$w$ 和 $h$ 组成,其中 $n$ ($0 \le n \le 10,000$) 是丝带的长度(英寸),$w$ ($1 \le w \le 100$) 是框架的宽度(英寸),$h$ ($1 \le h \le 100$) 是框架的高度(英寸)。

输出格式

输出一个整数,表示我们的艺术家可能制作的山景总数,对 $10^9 + 7$ 取模。

样例

样例输入 1

25 5 5

样例输出 1

7770

样例输入 2

15 5 5

样例输出 2

6050

样例输入 3

10 10 1

样例输出 3

1022

样例输入 4

4 2 2

样例输出 4

6

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.