文章标题

来源:互联网 发布:淘宝三无产品如何处罚 编辑:程序博客网 时间:2024/05/29 12:38

include

using namespace std;

const int MAX_LEN = 20;

struct SqBTree{
int length;
int value[MAX_LEN];
int height;
};
void createSqBTree(SqBTree &sqbt,int v[],int n){
int i, flag = 1;
sqbt.length = n;
for(i = 0; i <=sqbt.length; i++)
sqbt.value[i]= v[i];
for(i = 0;flag <= sqbt.length ; i++)
flag*=2;
sqbt.height = i;
}

void preShow(SqBTree sqbt,int i){
if(sqbt.value[i] !=0&& i <= sqbt.length){
cout<

0 0