#include<bits/stdc++.h>
#define LIST_INIT_SIZE 100
#define LISTINCREMENT 10
#define OVERFLLOW -1
typedef int ElemType;
typedef struct{
ElemType *elem;
int length;
int listsize;
}SqList;
void InitSqList(SqList &L){
L.elem=(ElemType *)malloc(100*sizeof(ElemType));
if(!L.elem)
exit(-1);
L.length=0;
L.listsize=100;
}
void GreateSqList(SqList &L,int n){
srand(time(NULL));
for(int i=0;i<n;i++){
L.elem[i]=rand()%100;
L.length=n;
}
}
void RankList(SqList &L){
for(int i=0;i<L.length;i++){
for(int j=0;j<L.length-i;j++){
if(L.elem[j]>L.elem[j+1]){
int t;