
树的遍历 重建
acm160920007
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
最小生成树
#includeusing namespace std;static const int MAX=100;static const int INFTY=(1static const int WHITE=0;static const int GRAY=1;static const int BLACK=2;int n,M[MAX][MAX];int prim() {原创 2017-08-08 16:57:28 · 244 阅读 · 0 评论 -
树的重建
#include#include#include#includeusing namespace std;vector pre,in,post;int n,pos;void rec(int l,int r) {if (l>=r) return ;int root=pre[pos++];原创 2017-07-27 15:51:06 · 276 阅读 · 0 评论