Code the Tree
| Time Limit: 1000MS | Memory Limit: 65536K | |
| Total Submissions: 2401 | Accepted: 923 |
Description
A tree (i.e. a connected graph without cycles) with vertices numbered by the integers 1, 2, ..., n is given. The "Prufer" code of such a tree is built as follows: the leaf (a vertex that is incident to only one edge) with the mi

博客介绍了如何根据给定的字符串表示无根树,并通过递归方法来构造树,进而求解该树的Prüfer序列。提供了具体的解题思路和AC代码。

858

被折叠的 条评论
为什么被折叠?



