#include<iostream>
#include<stdlib.h>
#include<vector>
#include<string.h>
#pragma warning(disable:4996)
using namespace std;
struct Node {
char data;
Node*lchild;
Node*rchild;
};
const int maxn = 10000;
char in[maxn];
char lay[maxn];
bool mark[maxn]; //标记是否是左子树中的结点
vector<int> Tree;
Node* build(int inL, int inR, vector<int> tree)
{
cout << "size:" << tree.size() << endl;
vector<int> tmpltree;
vector<int> tmprtree;
Node*tmp = new Node;
tmp->data = lay[tree[0]];
tmp->lchild = NULL;
tmp->rchild = NULL;
cout << "tmp->data:" << tmp->data << endl;
int numleft = 0, k;
memset(mark, 0, sizeof(mark));
for (k = inL; k <= inR; k++) //k是当前根结点在中序序列中的下标
{
if (in[k] == lay[tree[0]])
{
numleft = k - inL;
cout << "numleft:" << numleft << endl;
cout <