入门经典II 第六章 数据结构基础
文章平均质量分 51
black_and_blue
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
uva 673 Parentheses Balance 习题6-1 (栈——基础练习)
题目:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=614 说明:感觉被坑了,这么简单的题做了一个多小时...注意数据(() #include #include #include #include #include using name原创 2015-01-02 23:07:57 · 364 阅读 · 0 评论 -
uva 536 - Tree Recovery 入门经典II 第六章 数据结构基础 习题6-3
题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=477 题意:给出一颗树的前序、中序, 求后序。 思路:同例题6-8。 说明:虽然比较简单,但是自己能做出来还是挺有收获的。 #include #include #in原创 2015-01-25 21:08:57 · 465 阅读 · 0 评论 -
uva12657 - Boxes in a Line 入门经典II 第六章数据结构基础 例题6-5
题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=602&page=show_problem&problem=4395 说明:按着题中的思路敲的,本题还是有不少收获。 自己敲的代码: #include //#include//这里不能用iostream,和rig原创 2015-01-23 11:30:02 · 369 阅读 · 0 评论 -
uva699 The Falling Leaves 入门经典II 第六章数据结构基础 例题6-10
题目:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=8&page=show_problem&problem=640 说明:读几遍书中的代码就会理解作者的思路,收获是进一步了解了树。 #include #include #include using namespace s原创 2015-01-19 18:47:53 · 408 阅读 · 0 评论 -
uva10562 - Undraw the Trees 入门经典II 第六章数据结构基础 例题6-17
题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=17&page=show_problem&problem=1503 理解后写了一遍,感觉不难。 #include #include #include; #include using namespace std; c原创 2015-01-22 19:49:57 · 555 阅读 · 0 评论 -
uva11988 - Broken Keyboard (a.k.a. Beiju Text) 入门经典II 第六章数据结构基础 例题6-4
题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=229&page=show_problem&problem=3139 Sample Input This_is_a_[Beiju]_text [[]][][]Happy_Birthday_to_Tsinghua_Uni原创 2015-01-19 21:24:57 · 435 阅读 · 0 评论 -
uva297 - Quadtrees 入门经典II 第六章 数据结构基础 例题6-11
题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=4&page=show_problem&problem=233 说明:用书中的思路,一会的功夫写下来了,但是找bug找了好久,发现是数组开小了,但是汝佳的代码s[1024+10]就过了,我的代码s[1024+1024+10]原创 2015-01-23 10:04:04 · 403 阅读 · 0 评论 -
uva839 - Not so Mobile 入门经典II 第六章数据结构基础 例题6-9
题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=10&page=show_problem&problem=780 理解了之后代码挺简单的,不过不容易想,刘汝佳的代码确实很简洁。刚开始没有理解W的作用,其实main里的W并无作用,他是为了递归中solve(W1)中的W1用的原创 2015-01-17 21:54:43 · 492 阅读 · 0 评论 -
uva679 Dropping Balls 入门经典II 第六章数据结构基础 例题6-6
题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=620 收获:对于一个节点K,其左子节点、右子节点的编号分别为2K和2K+1。对于二叉树有了基本的理解。 #include #include using namespace std原创 2015-01-18 09:57:13 · 412 阅读 · 0 评论 -
uva572 - Oil Deposits 入门经典II 第六章数据结构基础 例题6-12
题目:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=7&page=show_problem&problem=513 说明:用DFS求连通块,理解了之后挺简单的。 #include #include #include using namespace std; char原创 2015-01-18 18:18:49 · 417 阅读 · 0 评论 -
uva548 - Tree 入门经典II 第六章数据结构基础 例题6-8
题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=489 已知中序遍历、后序遍历,找一个叶子使它到根的路径上权和最小,输出这个叶子。 #include #include #include #include using namesp原创 2015-01-24 12:45:36 · 614 阅读 · 0 评论
分享