#P5548. [BJ United Round #3] 押韵
[BJ United Round #3] 押韵
Description
Now you want to write a song lyric with a total of characters. You have designed types of rhyme endings, and each character must fit exactly one type of rhyme ending.
Also, the song sounds good only if, for every rhyme ending type, the number of characters in the lyric that use this rhyme ending is exactly a multiple of .
How many ways are there to assign rhyme endings so that the song sounds good?
You only need to output the number of ways modulo .
Input Format
One line with three integers , as described.
Output Format
One line with one integer, the answer.
2 2 2
8
2 3 4
213
2 4 6
5548
Hint
For of the testdata, it is guaranteed that:
By: EntropyIncreaser
Translated by ChatGPT 5
京公网安备 11011102002149号