摘要: 1 #include <iostream> 2 #include <cstdio> 3 using namespace std; 4 int a[100]; 5 void qsort(int *s,int *e) 6 { 7 if (s>=e) return; 8 int mid = *(s+(e- 阅读全文
posted @ 2016-12-27 21:49 HITLJR 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 裸基数排序 #include <iostream> using namespace std; struct list_ { int v; int next; }a[1005]; void print(list_ a[],int head) { for (int i = head; i != -1; 阅读全文
posted @ 2016-12-27 21:37 HITLJR 阅读(425) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; int tem[1005]; int a[1005]; bool com1(int x,int y) { return x >= y; } bool com2(int x ,int y) { return x <=y; 阅读全文
posted @ 2016-12-27 17:15 HITLJR 阅读(98) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; int a[1005]; bool com1(int a,int b) { return a > b; } bool com2(int a,int b) { return a =1; i--) adjust(a,i,n,com); for (int i = n-1; i>=1 ; i--) ... 阅读全文
posted @ 2016-12-27 15:16 HITLJR 阅读(171) 评论(0) 推荐(0) 编辑