摘要: 1 #include<stdio.h> 2 #include<string.h> 3 #include<stdlib.h> 4 #define N 20001 5 #define LEFT(x) ((x<<1)+1) 6 #define RIGHT(x) ((x+1)<<1) 7 #define P 阅读全文
posted @ 2012-10-15 22:03 xxx0624 阅读(168) 评论(0) 推荐(0) 编辑
摘要: View Code 1 #include<stdio.h> 2 #define N 20005 3 int n,a[N]; 4 void quick_sort(int low,int up){ 5 int i,j,tmp; 6 if(low<up){ 7 i=low; 8 j=up; 9 tmp=a[low];10 while(i!=j){11 while(i<j&&a[j]>tmp)12 j--;13 if(i<j) a[i++]=... 阅读全文
posted @ 2012-10-15 21:14 xxx0624 阅读(257) 评论(0) 推荐(0) 编辑