void qsort(int l,int r){ int i,j,t,mid; mid=b[(l+r)>>1]; i=l; j=r; do{ while (b[i]<mid) i++; while (b[j]>mid) j--; if (i<=j) { t=b[i]; b[i]=b[j]; b[j]=t; i++; j--; } } while (i<=j); if (i<r) qsort(i,r); if (l<j) qsort(l,j); }