```int Partition(SeqList &L,Student a[],int low,int high)
{
a[0]=a[low];
char pivotkey=a[low].no;
while(low {
while(low=pivotkey) --high;
a[low]=a[high];
while(low<high&&a[low].no<=pivotkey) ++low;
a[high]=a[low];
}
a[low]=a[0];
return low;
}
void QSort(SeqList &L,Student a[],int low,int high)
{
if(low<high){
int pivotloc=Partition(L,a,low,high);
QSort(L,a,low,pivotloc-1);
QSort(L,a,pivotloc+1,high);
}
}
void QuickSort(SeqList &L)
{
Student a[MAXSIZE];//排序专用临时数组
for(int i=1;i<=L.last;i++)
a[i]=L.elem[i];
QSort(L,a,1,L.last);
for(i=1;i<L.last;i++)
{
printf("学号:%s 姓名:%s 成绩:%d\n\n",L.elem[i].no,L.elem[i].name,L.elem[i].price);
}
printf("\n");
}