#P3214. [HNOI2011] 卡农
[HNOI2011] 卡农
Description
As is well known, a canon is a polyphonic composition technique. While listening to canons, Xiao Yu had a burst of inspiration and invented a new rule for writing music.
He divides the sounds into notes and splits the music into several segments. Each segment is a harmony composed of to notes, i.e., selecting some of the notes to play simultaneously.
To distinguish it from canons, he stipulates that the set of notes contained in any two segments must be different. To maintain regularity, he also requires that in one piece of music each note is sounded an even number of times across all segments.
Now the question is: how many pieces of music consisting of segments are there? Two pieces of music and are considered the same if and only if can be obtained by reordering the segments of . For example, suppose is and is , then and are the same music.
The answer should be taken modulo .
Input Format
One line containing two positive integers .
Output Format
Output one line with a single integer representing the answer.
2 3
1
Hint
Constraints
For of the testdata, .
For of the testdata, .
For of the testdata, .
Sample Explanation
The music is .
Translated by ChatGPT 5
京公网安备 11011102002149号