For example, the cactusability of the tree on the left picture is 12. The twelve cactuses that it can be converted to are shown on the right.
Given a tree, you have to find its cactusability.
The first line of the input file contains one integer number n — the number of vertices in a tree (1 ≤ n ≤ 200). The next n − 1 lines contain edges of a tree.
Write to the output file a single integer number — the cactusability of the given tree.
java is not allowed
Andrew Stankevich Contest 16
No tag edit access