#P16637. 春季限定独立集问题
春季限定独立集问题
Background

Problem Description
There is a rooted tree with nodes, and the root is .
For , let be the smallest prime factor of . Then the parent of node is .
Find the size of the maximum independent set of this tree.
Input Format
One line with a non-negative integer , representing the number of nodes in the tree.
Output Format
One line with a non-negative integer, representing the size of the maximum independent set of this tree.
7
4
114514
68372
10000000000
5971085299
Hint
Constraints
- For of the testdata, .
- For of the testdata, .
- For of the testdata, .
- For of the testdata, .
- For of the testdata, .
Translated by ChatGPT 5