- 2
- 0
- 约6.34千字
- 约 8页
- 2021-01-29 发布于天津
- 举报
#define CPP C++ // #define MPP M++ // #define MP2 M+=2 #define MP3 M+=3
比较
移动
#includeiostream.h
#include string.h
#includestdlib.h
#include iomanip.h
#include math.h
#includetime.h
存储结构(数组)
const int maxsize=1000; //
排序表容量,假设为 100..
typedef int datatype; //
假设存储元素是整形类型
typedef struct {
datatype key; //
关键字域
}rectype; // 记录类型
typedef rectype list[maxsize+1]; //
排序表类型, 0 号单元不用;
__int64 C,M; //
比较和移动次数
void checkup(list R,int n) { //
检验升序排序结果
int i;
for(i=2;i=n;i++)
if(R[i].keyR[i-1].key) {coutError!\n;return;}
coutCorrect! endl;
}
void checkdown(list R,int n) { //
检验降序排序结果
int i;
for(i=2
您可能关注的文档
最近下载
- PBG矿用隔爆型永磁式高压真空配电装置 使用说明 兼容模式.pdf VIP
- (2026秋新版)人教版五年级数学上册全册教学设计.docx
- YZB100枕式包装机确认方案---副本.doc VIP
- (2026秋新版)教科版六年级科学上册《3.地球如何自转》PPT课件.pptx VIP
- 新教材人教版三年级上册英语全册教案(完整版)教学设计(1).docx VIP
- 丰田工厂现场异常管理.pdf VIP
- PST 645UX变压器保护测控装置说明书_V1.03-D.pdf VIP
- 公司章程电子版范本.pdf VIP
- 主要的生态环境问题课件 PPT.pptx VIP
- T TJKCSJ 012—2025 天津市城市涉路施工交通安全设施设置标准.pdf VIP
原创力文档

文档评论(0)