ĵο֮ϵ
point b[le]; int i,d[2]; d[0]=0;d[1]=0; for(i=0;i qsort(b,0,le-1,d); cout<<\:\ɵ:\ for(i=0;i cout< }; void diu(point b[],int we,int *jh,int *bj) { point a;int i,q; for(i=we/2-1;i>=0;i--){ q=strcmp(b[i].key,b[2*i].key);*bj=*bj+1; if(q==-1){ }; 13 2020419 b[i]=c[i]; cout< a=b[i];b[i]=b[2*i];b[2*i]=a;*jh=*jh+3; ĵο֮ϵ if(2*i+1 a=b[i];b[i]=b[2*i+1];b[2*i+1]=a;*jh=*jh+3; }; }; }; a=b[we-1];b[we-1]=b[0];b[0]=a;*jh=*jh+3; }; // void diup(point c[]) { point b[le]; int i,jh=0,bj=0,*j,*bl; j=&jh;bl=&bj; for(i=0;i }; for(i=le;i>1;i--){ diu(b,i,j,bl); }; cout<<\:\ɵ:\ 2020419 14 ĵο֮ϵ for(i=0;i cout< \ }; void main() { int i,j,n=10,ans,an; char b[]=\ point a[le]; for(i=0;i an=rand()*(n-1)/RAND_MAX+1; n=26; for(j=0;j }; a[i].key[j]='\\0'; }; for(i=0;i 2020419 15 ĵο֮ϵ cout< }; zhijiecharu(a); maopao(a); xier(a); jiandanxuanze(a); kuaisu(a); diup(a); } οٶĿ 5. ʵ н£ ֱӲ: ɵ: *************************** ðݷ: ɵ: 2020419 16