#P1002. 树(c)
树(c)
Tree
Problem description
Given an integer , find the number of possible forms of a rooted tree with nodes.
Input format
The first line is a non-negative integer , indicating that there are sets of data.
Subsequently, there are lines, with one integer on each line.
Output Format
There are lines, each containing an integer, and the number of possible configurations is sought.
Since the answer may be very large, we need to output the answer modulo .
1
3
9
1
323
283888610
Data Range
For all data:
Tips
The pink node is the root.
Example 1:
相关
在下列比赛中: