摘要: 一、任务一班有m个女生,有n个男生(m不等于n),现要开一个舞会。男女生分别编号坐在舞池的两边的椅子上,每曲开始时,依次从男生和女生中各出一人配对跳舞, 本曲没成功配对者坐着等待下一曲找舞伴。配对成功的舞伴跳完舞后排回各自队伍的最后。请设计一系统模拟动态地显示出上述过程,要求输出计算任何一个女生(编... 阅读全文
posted @ 2015-10-27 21:40 默默笙萧 阅读(2193) 评论(0) 推荐(0) 编辑
摘要: 1、快速排序算法 1 #include 2 3 struct node 4 { 5 int key; 6 }; 7 typedef struct node DataType; 8 9 int Qukpass_sort(DataType Ar[],int s,int t);10 int Q... 阅读全文
posted @ 2015-10-27 20:56 默默笙萧 阅读(464) 评论(0) 推荐(0) 编辑
摘要: 1、直接插入排序 1 #include 2 3 struct node 4 { 5 int key; 6 }; 7 typedef struct node DataType; 8 9 int Ins_Sort(DataType Ar[],int n);10 11 int main(voi... 阅读全文
posted @ 2015-10-27 20:29 默默笙萧 阅读(10066) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 struct node 3 { 4 int key; 5 }; 6 typedef struct node DataType; 7 8 int Bub_sort(DataType Ar[],int n); 9 10 int main(void)11 {12 ... 阅读全文
posted @ 2015-10-27 20:26 默默笙萧 阅读(3432) 评论(0) 推荐(0) 编辑