#P4295. [SCOI2003] 严格N元树
[SCOI2003] 严格N元树
Description
If every non-leaf node of a tree has exactly children, we call it a strict -ary tree. If the deepest nodes in the tree have depth (the root has depth ), then we call it a strict -ary tree of depth . For example, there are three strict -ary trees of depth , as shown below:

Given , write a program to count the number of strict -ary trees of depth .
Input Format
Contains only two integers (, ). The testdata guarantees that you do not need to consider trees with more than nodes on any level (i.e., ).
Output Format
Contains only one number, which is the number of strict -ary trees of depth .
2 2
3
2 3
21
3 5
58871587162270592645034001
Hint
The answer is guaranteed to be at most decimal digits.
Translated by ChatGPT 5
京公网安备 11011102002149号