#P1472. [USACO2.3] 奶牛家谱 Cow Pedigrees

    ID: 463 远端评测题 1000ms 125MiB 尝试: 0 已通过: 0 难度: 7 上传者: 标签>动态规划,dp树形结构USACO前缀和构造

[USACO2.3] 奶牛家谱 Cow Pedigrees

Description

How many distinct structures are there for an unlabeled full binary tree (each node has either 00 or 22 children) with nn nodes and depth kk? The depth of the root is defined as 11.

Output the answer modulo 99019901.

Input Format

Two space-separated integers n,kn, k.

Output Format

Output a single integer on one line representing the answer.

5 3

2

Hint

Constraints
For 100%100\% of the testdata, 3n<2003 \le n < 200, 2k<1002 \le k < 100.

USACO 2.3.

Translated by ChatGPT 5