QOJ.ac

QOJ

시간 제한: 3.0 s 메모리 제한: 1024 MB 총점: 100 해킹 가능 ✓

#18122. GG

통계

“如果你做不出一道题,就换另一道。万一这题是防 AK 题呢?”

给定三个整数 $n, a, b$。

考虑所有满足 $1 \le l < r \le n$ 的区间 $[l, r]$。你需要选择其中的一些区间(可以不选),满足以下条件:

  • 所有选中的区间都包含在 $[1, n]$ 中;
  • 所有选中区间的端点两两不同。换句话说,如果选中的区间为 $[l_1, r_1], [l_2, r_2], \dots, [l_k, r_k]$,那么这 $2k$ 个数 $l_1, r_1, l_2, r_2, \dots, l_k, r_k$ 两两不同;
  • 存在 $a$ 个选中的区间 $[l_1, r_1], [l_2, r_2], \dots, [l_a, r_a]$,满足 $l_1 < l_2 < \dots < l_a$ 且 $r_a < r_{a-1} < \dots < r_1$;
  • 存在 $b$ 个选中的区间 $[l_1, r_1], [l_2, r_2], \dots, [l_b, r_b]$,满足 $l_1 < l_2 < \dots < l_b$ 且 $r_1 < r_2 < \dots < r_b$。

求选择区间的合法方案数。由于答案可能很大,请将答案对 $10^9 + 7$ 取模。

“明智的决定”

输入格式

输入仅包含一行,有三个整数 $n, a, b$($2 \le n \le 100$,$0 \le a, b \le n$)。

输出格式

输出一个整数,表示合法的区间选择方案数对 $10^9 + 7$ 取模后的结果。

样例

输入样例 1

2 0 0

输出样例 1

2

输入样例 2

2 0 1

输出样例 2

1

输入样例 3

5 1 2

输出样例 3

10

输入样例 4

9 2 3

输出样例 4

504

输入样例 5

100 14 22

输出样例 5

36993304

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.