#include <iostream>
#include <stdio.h>
#include <cstdio>
#include <string>
#include <string.h>
#include <math.h>
#include <algorithm>
#include <stack>
using namespace std;
#define maxSize 101
/*
//查找值为k的元素的位置 天勤P276 例9-1
int Search(int a[],int n,int k)
{
for(int i=1;i<=n;i++)
{
if(a[i]==k)
{
return i;
}
}
return 0;
}
int main()
{
int a[101],n;
cin>>n;
for(int i=1;i<=n;i++)
{
cin>>a[i];
}
int d=Search(a,n,5);
cout<<d<<endl;
}
*/
/*
//判断是否是二叉排序树 天勤P298 真题仿造
typedef struct BiTree
{
int data;
struct BiTree *lchild,*rchild;
}BiTree;
int Judge(BiTree *t)
{
if(t!=NULL)
return 1; //空树是二叉排序树
if(t)
{
int d1=Judge(t->lchild);
if(d1==false||t->data<)
return 0;