xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

資源簡介

經典排序算法合集C 書寫

資源截圖

代碼片段和文件信息

/*
??Name:排序算法大合集?
??CopyRight:
??Author:?Cz
??Date:?2019/10/1?21:29:02
??Description:
*/



#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using?namespace?std;
typedef?long?long?ll;
const?int?maxn?=100;
int?num[maxn];//測試數組?
const?int?len?=?15;//數字大小?
const?int?inf?=?0x3f3f3f3f;
void?exch(int&?a?int&?b){
int?tmp?=?a;
a?=?b;
b?=?tmp;
}?
void??show(){
for(int?i=0;?i cout< }
cout<}


//選擇排序
//基本思想:每次選出一個最小值放在當前位置上,一個一個碼好
void?selectSort(){
int?pos?=?0;
int?min?=?inf;
for(int?i=0;?i pos?=?i;
min?=?num[i];
for(int?j=i+1;??j

評論

共有 條評論