Universal Cup Judging System

Universal Cup

Time Limit: 3.0 s Memory Limit: 1024 MB Total points: 100 Hackable ✓
Statistics

“ถ้าคุณแก้โจทย์ข้อหนึ่งไม่ได้ ก็แค่เปลี่ยนไปทำข้ออื่น จะเกิดอะไรขึ้นถ้าข้อนี้เป็นโจทย์กัน AK ล่ะ?”

กำหนดจำนวนเต็มสามตัวคือ $n, a, b$

พิจารณาช่วง $[l, r]$ ทั้งหมดที่ $1 \le l < r \le n$ คุณต้องเลือกช่วงเหล่านี้บางส่วน (อาจจะไม่เลือกเลยก็ได้) โดยให้เป็นไปตามเงื่อนไขต่อไปนี้:

  • ช่วงที่ถูกเลือกทั้งหมดอยู่ภายใน $[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.