#P3266. [JLOI2015] 骗我呢
[JLOI2015] 骗我呢
Description
Speaking of which, after graduation, B has only met R twice.
R has an array .
For , it holds that . Find the number of possible arrays .
B thinks the constraints are too loose and additionally requires that for , we have ; and for , we have .
B believes R can just pwn this problem.
R says: "This trolling is way too realistic =.=, at least take the answer modulo ." B thinks R makes sense, so he asks you to compute the answer modulo .
Input Format
A single line with two integers , as described above.
Output Format
A single line with a single number: the count of arrays that satisfy both B's and R's conditions, modulo .
3 3
40
Hint
For of the testdata, .
Translated by ChatGPT 5
京公网安备 11011102002149号