void QuickSort(int a[],int low,int high) { int i,j,t; i=low; j=high; t=a[i]; while(i<j) { while(i<j && a[j]>=t) j--; if(i<j) { a[i]=a[j]; i++; } while(i<j && a[i]<=t) i++; if(i<j) { a[j]=a[i]; j--; } } a[i]=t; if(low<i-1) QuickSort(a,low,i-1); if(i+1<high) QuickSort(a,i+1,high); }