随笔分类 -  数据结构--二叉树

摘要:Parliament Time limit: 1.0 secondMemory limit: 64 MB A new parliament is elected in the state of MMMM. Each member of the parliament gets his unique p 阅读全文
posted @ 2016-09-07 19:39 贱人方 阅读(280) 评论(0) 推荐(0)
摘要:题目链接:http://acm.hust.edu.cn/vjudge/problem/19244 #include <iostream> #include <cstdio> #include <cstdlib> #include <cmath> #include <algorithm> #inclu 阅读全文
posted @ 2016-08-04 20:59 贱人方 阅读(132) 评论(0) 推荐(0)
摘要:题目连接:http://acm.hust.edu.cn/vjudge/problem/19486 给你一个杠杆两端的物体的质量和力臂,如果质量为零,则下面是一个杠杆,判断是否所有杠杆平衡。 分析:递归。直接递归求解即可。 #include <iostream> #include <cstdio> # 阅读全文
posted @ 2016-08-04 20:34 贱人方 阅读(128) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2016-08-04 19:40 贱人方 阅读(290) 评论(0) 推荐(0)