QOJ.ac

QOJ

Limite de temps : 1 s Limite de mémoire : 1024 MB Points totaux : 100

#15365. 轰!

Statistiques

Tadhg 在学校的化学实验室里发现了一条有趣的带子。这条带子被分成了 $N$ 个等长的段,并且可以很容易地在两个相邻段之间折叠,但只能正好折叠 180 度。

带子的一面完全涂满了一种极易挥发的化学物质。如果这种化学物质自身接触,就会达到临界质量并发生爆炸。

带子的另一面还没有完全涂满。只有前 $A$ 个段和后 $B$ 个段涂有完全相同的化学物质。

编写一个程序,计算 Tadhg 可以折叠带子且不发生爆炸的不同折叠方式的数量。他可以折叠带子多次,如果存在至少一个段与段之间的连接处,在一种折叠方式中被折叠了,而在另一种中没有被折叠,则这两种折叠方式被认为是不同的。

由于答案可能非常大,请输出结果模 10301 的余数。

以下示例展示了 $N=4$,$A=1$ 且 $B=1$ 时所有 6 种可能的方式。为了清晰起见,插图中带子仅折叠了 90 度。实际上 Tadhg 会将其折叠 180 度。

注:未折叠的状态也算作 1 种情况

输入格式

输入仅包含一行,有三个自然数 $N$、$A$ 和 $B$($A>0$,$B>0$,$A+B \le N \le 1000$),分别代表带子的总段数、左侧涂有化学物质的段数以及右侧涂有化学物质的段数。

输出格式

输出仅包含一行,代表折叠带子的可能方式数量模 10301 的值。

样例

输入样例 1

4 1 1

输出样例 1

6

输入样例 2

5 2 2

输出样例 2

1

输入样例 3

6 1 2

输出样例 3

7

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.