递归
ffutop
这个作者很懒,什么都没留下…
展开
-
ZOJ 3965 Binary Tree Restoring (递归)
Given two depth-first-search (DFS) sequences of a binary tree, can you find a binary tree which satisfies both of the DFS sequences?Recall that a binary tree is a tree in which each vertex has at most原创 2017-04-24 10:34:14 · 1627 阅读 · 0 评论 -
HDU 6121 Build a tree (递归+特判, 2017 Multi-Univ Training Contest 7)
ProblemProblem LinkHazelFan wants to build a rooted tree. The tree has n nodes labeled 0 to n−1, and the father of the node labeled i is the node labeled⌊i−1k⌋\lfloor \frac{i-1}{k} \rfloor . HazelFan w原创 2017-08-16 10:13:07 · 366 阅读 · 0 评论