freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

visual_c_60_各種排序的算法_報(bào)告及源程序-資料下載頁

2025-03-23 00:36本頁面
  

【正文】 clock_t start。 clock_t end。 double time1。 start=clock()。 for(k=0。kn1。k++) { index=k。 for(i=k+1。in。i++) { cpt1++。 if(R[i]R[index]) { index=i。 } } if(index!=k) { count1++。 temp=R[index]。 R[index]=R[k]。 R[k]=temp。 } } if((fp=fopen(,w)) == NULL) { printf(error)。 exit(0)。 } for(i=0。in。i++) { fprintf(fp,%d ,R[i])。 } if(fclose(fp)) { printf(Can not close the file)。 exit(0)。 } end=clock()。 time1=(double)(endstart)/CLOCKS_PER_SEC。 printf(====================================\n)。 printf(SelectSort:\n)。 printf(Select Sort Spend %.2lf seconds\n,time1)。 printf(Select Sort Compare %.0lf times\n,cpt1)。 printf(Select Sort Swap %.0lf times\n,count1)。 printf(\n\n)。 } void InsertSort(int R[],int n) /*插入排序*/ { int i,j,temp。 double count2=0,cpt2=0,cpt3=0。 FILE*fp。 clock_t start。 clock_t end。 double time2。 start=clock()。 for(i=1。in。i++) { temp=R[i]。 for(j=i1。j=0。j) { cpt2++。 if(temp=R[j]) break。 R[j+1]=R[j]。 } R[j+1]=temp。 if(j+1==i1) count2++。 else count2=count2+0。 } if((fp=fopen(,w)) == NULL) { printf(error)。 exit(0)。 } for(i=0。in。i++) { fprintf(fp,%d ,R[i])。 } if(fclose(fp)) { printf(Can not close the file)。 exit(0)。 } end=clock()。 time2=(double)(endstart)/CLOCKS_PER_SEC。 printf(===================================\n)。 printf(InsertSort:\n)。 printf(Insert Sort Spend %.2lf seconds\n,time2)。 printf(Insert Sort Compare %.0lf times\n,cpt2)。 printf(Insert Sort Swap %.0lf times\n,count2)。 printf(\n\n)。 } void PopSort(int R[ ],int n) /*冒泡排序*/ { int i,j,t。 double count3=, cpt4=。 FILE*fp。 clock_t start。 clock_t end。 double time3。 start=clock()。 for(i=1。in。i++) { for(j=0。jni。j++) { if(R[j]R[j+1]) { count3++。 t=R[j]。 R[j]=R[j+1]。 R[j+1]=t。 } cpt4++。 } } if((fp =fopen(,w))== NULL) { printf(error)。 exit(0)。 } for(i=0。in。i++) { fprintf(fp,%d ,R[i])。 } if(fclose(fp)) { printf(Can not close the file)。 exit(0)。 } end=clock()。 time3=(double)(endstart)/CLOCKS_PER_SEC。 printf(====================================\n)。 printf(PopSort:\n)。 printf(pop Sort Spend %.2lf seconds\n,time3)。 printf(pop Sort Compare %.0lf times\n,cpt4)。 printf(pop Sort Swap %.0lf times\n,count3)。 printf(\n\n)。 } void wele(){ printf(\n)。 printf(\n)。 printf( ┏━━━━━━━━━━━━━━━━━━━━━━━┓\n)。 printf( ┃ 各種排序算法比較 ┃\n)。 printf( ┃┃ \n)。 printf( ┃ (c)All Right Reserved wyy ┃\n)。 printf( ┃ wumberond@ ┃\n)。 printf( ┃ version 2009 ┃\n)。 printf( ┗━━━━━━━━━━━━━━━━━━━━━━━┛\n)。 printf( Press Enter to Continue……)。 getchar()。 system(cls)。
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1