#include<iostream>
#include<malloc.h>
using namespace std;
#define MaxSize 100
typedef int ElemType;
typedef struct{
int length;
ElemType data[MaxSize];
}SqList;
void CreateList(SqList *&L,ElemType a[],int n)
{
L=(SqList *)malloc(sizeof(SqList));
int i=0;
int k=0;
while(i<n)
{
L->data[i]=a[i];
i++;
k++;
}
L->length=k;
} //½¨Ë³Ðò±í
void InitList(SqList *&L)
{
L=(SqList *)malloc(sizeof(SqList));
L->length=0;
}
void DeleteList(SqList *&L)
{
free(L);
}
bool ListEmpty(SqList *L)
{
return L->length==0;
}
int ListLength(SqList *L)
{
return L->length;
}
void DispList(SqList *L)
{
int i;
for(i=0;i<L->length;i++)
cout<<L->data[i];
cout<<"\n"<<endl;
}
bool GetElem(SqList *&L,int i,ElemType &e)
{
if(i<1||i&