#P2767. 树的数量
树的数量
Description
Compute the number of rooted -ary trees (unlabeled) with nodes, modulo .
Two rooted trees are identical if and only if their roots are identical and, from left to right, each subtree is also identical. In particular, if both rooted trees are empty, they are considered identical.
Input Format
Input two integers , .
Output Format
Output the number of rooted -ary trees (unlabeled) with nodes, modulo .
2 2
2
Hint
Constraints: .
Translated by ChatGPT 5
京公网安备 11011102002149号