09 2016 档案

PAT1043 BST 镜像管不了了
摘要:考虑到 出现相同的数等等 阅读全文

posted @ 2016-09-22 21:36 SijingLin 阅读(142) 评论(0) 推荐(0)

PAT1004 Counting Leaves (30) 数组链式建树
摘要:一开始尝试用二叉树,最后用结构 struct node{ int k; int son[101];}; son[i]记录子结点 阅读全文

posted @ 2016-09-18 14:10 SijingLin 阅读(130) 评论(0) 推荐(0)

对拍
摘要:http://blog.csdn.net/wyt734933289/article/details/47400433 有些数据造不出来 错误的 freopen("e:\\duipai\\data.txt","r",stdin); freopen ("e:\\duipai\\out2.txt","w" 阅读全文

posted @ 2016-09-08 16:10 SijingLin 阅读(106) 评论(0) 推荐(0)

二叉查找树(Binary Search Tree)
摘要:原理 编辑 原理 二叉排序树的查找过程和次优二叉树类似,通常采取二叉链表作为二叉排序树的存储结构。中序遍历二叉排序树可得到一个关键字的有序序列,一个无序序列可以通过构造一棵二叉排序树变成一个有序序列,构造树的过程即为对无序序列进行排序的过程。每次插入的新的结点都是二叉排序树上新的叶子结点,在进行插入 阅读全文

posted @ 2016-09-08 14:38 SijingLin 阅读(130) 评论(0) 推荐(0)

uva679
摘要:看了书上的分析写的,不需要建树,知道第i个ball就能知道对应的叶子结点,不用进行前i-1个球掉落过程 阅读全文

posted @ 2016-09-07 19:51 SijingLin 阅读(143) 评论(0) 推荐(0)

PAT1020 一个case出现段错误,可是我找不到
摘要://PAT1020 二叉树 建树 层序遍历 #include #include #include #include using namespace std; typedef int ElementType ; typedef struct TNode *Position; typedef Position BinTree; struct TNode{ ElementType Data; ... 阅读全文

posted @ 2016-09-04 16:43 SijingLin 阅读(401) 评论(0) 推荐(0)

PAT1017 和强迫症做斗争
摘要:改完了,以后开数组都开个最大的,不用int a[k]或是malloc,会出现段错误,原因不明。或者dev c++ 好像会出错 这题改了3天... 阅读全文

posted @ 2016-09-02 16:30 SijingLin 阅读(222) 评论(0) 推荐(0)

导航