QOJ.ac

QOJ

حد الوقت: 1 s حد الذاكرة: 128 MB مجموع النقاط: 100

#16349. Canon

الإحصائيات

As is well known, Canon is a type of contrapuntal musical composition technique. Inspired by listening to Canon music, Xiao Yu invented a new rule for musical notation. He divides the sounds into $n$ scales and divides the music into $m$ segments. Each segment of the music is a chord composed of 1 to $n$ scales, meaning a subset of the $n$ scales is chosen to be played simultaneously. To emphasize the uniqueness of the Canon, he stipulates that the sets of scales contained in any two segments must be distinct. Furthermore, to maintain the regularity of the music, he also stipulates that each scale must be played an even number of times across the entire piece of music. The problem is: Xiao Yu wants to know how many different types of music containing $m$ segments exist. Two pieces of music $a$ and $b$ are considered the same if and only if $b$ can be obtained by reordering the segments of $a$. For example, if $a$ is $\{\{1, 2\}, \{2, 3\}\}$ and $b$ is $\{\{3, 2\}, \{2, 1\}\}$, then $a$ and $b$ are the same type of music. Since the number of types is very large, you only need to output the result modulo $100000007$ (a prime number).

Input

The input consists of a single line containing two positive integers $n$ and $m$, separated by a space, representing the number of scales and the number of segments in the music, respectively. 20% of the data satisfies $n, m \le 5$, 50% of the data satisfies $n, m \le 3000$, and 100% of the data satisfies $n, m \le 1000000$.

Output

The output contains a single non-negative integer representing the number of types of music modulo $100000007$.

Examples

Input 1

2 3

Output 1

1

Note

The music is $\{\{1\}, \{2\}, \{1, 2\}\}$.

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.