随笔分类 - 二叉树
摘要:problemsolutioncodes#include#define maxn 1= r){ tree[++top].t = check(l,r); return top; } tree[++top].t = check(l,...
阅读全文
摘要:problemsolutioncodes#include#include#define maxn 10#define maxv maxn*30char in[maxn], post[maxn];char lch[maxv], rch[maxv];int build(i...
阅读全文
摘要:problemsolutioncodes#include#include#define maxn 550using namespace std;int tree[maxn][2];void dfs(char x){ cout>n; for(int i = ...
阅读全文
摘要:problemsolutioncodes#includeusing namespace std;const int maxn = 110;int tree[maxn][2];void dfs1(int now){ cout>n; for(int i = 1...
阅读全文
摘要:problemsolutioncodes#include#includeusing namespace std;const int maxn = 110;int tree[maxn][2], higt, weigt[maxn], ww;void dfs(int now...
阅读全文