#P1472. [USACO2.3] 奶牛家谱 Cow Pedigrees
[USACO2.3] 奶牛家谱 Cow Pedigrees
Description
How many distinct structures are there for an unlabeled full binary tree (each node has either or children) with nodes and depth ? The depth of the root is defined as .
Output the answer modulo .
Input Format
Two space-separated integers .
Output Format
Output a single integer on one line representing the answer.
5 3
2
Hint
Constraints
For of the testdata, , .
USACO 2.3.
Translated by ChatGPT 5
京公网安备 11011102002149号