【二叉树】
Mr丶Gao
加油!
展开
-
SDNU 1168.FBI树【NOIP 2004 普及组】【不建树】【7月28】
FBI树 解题的思路不止一种,或许还有更优的解。 Description 我们可以把由“0”和“1”组成的字符串分为三类:全“0”串称为B串,全“1”串称为I串,既含“0”又含“1”的串则称为F串。 FBI树是一种二叉树[1],它的结点类型也包括F结点,B结点和I结点三种。由一个长度为2N的“01”串S可以构造出一棵FBI树T,递归的构造方法如下:原创 2015-07-28 10:55:07 · 885 阅读 · 0 评论 -
UVa 548 - Tree【二叉树的递归遍历(DFS)】
548 - Tree You are to determine the value of the leaf node in a given binary tree that is the terminal node of a path of least value from the root of the binary tree to any leaf. The value of a path原创 2015-06-10 19:13:09 · 521 阅读 · 0 评论 -
SDNU 1015.最远路径【二叉树DFS】
1015.最远路径 Description 有一棵有n个节点的二叉树,它的节点编号为1到n,根节点编号是1,它的每条边都有一个给定的长度。请你求出该二叉树中距离根节点最远的节点。 Input 第1行:一个数字n(1 第2至第n+1行:每行有三个整数,第i 行中的三个整数分别表示编号为i-1的节点与其父节点之间边的长度、编号为i-1的节点左孩子的编原创 2015-06-11 19:36:37 · 1165 阅读 · 0 评论 -
HDU 5444.Elven Postman【2015 ACM/ICPC Asia Regional Changchun Online】【二叉树建立与遍历】9月14
Elven Postman Problem Description Elves are very peculiar creatures. As we all know, they can live for a very long time and their magical prowess are not something to be taken lightly. Also, t原创 2015-09-14 20:25:15 · 576 阅读 · 0 评论 -
UVa 297.Quadtrees【非二叉树之四分树】【7月31】
Quadtrees A quadtree is a representation format used to encode images. The fundamental idea behind the quadtree is that any image can be split into four quadrants. Each quadrant may again be split原创 2015-07-31 16:17:17 · 854 阅读 · 0 评论 -
【学习过程】二叉树的一些操作
本人渣渣,正在学习树的一些东西······· 原资源:http://http://zhidao.baidu.com/link?url=n85l6ITnvsc86Dukj3weLMw4NtnsG4liOrMMFkDPDFvGynC4W4QBzLjUkWdUwRJdW3YKAL4UnVEuWXAn7HYHLq //先序递归创建二叉树,并对其进行 先序、中序、后序遍历 #include // ma转载 2015-06-05 19:34:25 · 527 阅读 · 0 评论 -
UVa 122 - Trees on the level【二叉树初接触(BFS)】
122 - Trees on the level Background Trees are fundamental in many branches of computer science. Current state-of-the art parallel computers such as Thinking Machines' CM-5 are based on fat trees.原创 2015-06-10 21:56:23 · 545 阅读 · 0 评论