P1472 [USACO2.3] Cow Pedigrees
Description
How many distinct structures are there for an unlabeled full binary tree (each node has either $0$ or $2$ children) with $n$ nodes and depth $k$? The depth of the root is defined as $1$.
Output the answer modulo $9901$.
Input Format
Two space-separated integers $n, k$.
Output Format
Output a single integer on one line representing the answer.
Explanation/Hint
Constraints
For $100\%$ of the testdata, $3 \le n < 200$, $2 \le k < 100$.
USACO 2.3.
Translated by ChatGPT 5