void sort_quick(vector<int> &v,int left,int right)
{
if(left>=right) return;
int tmp=v[left];
int i=left,j=right;
while(i!=j)
{
while(i<j&&v[j]>tmp) j--;
if(i<j) v[i]=v[j];
while(i<j&&v[i]<tmp) i++;
if(i<j) v[j]=v[i];
}
v[i]=tmp;
sort_quick(v,left,i-1);
sort_quick(v,i+1,right);
}
转载于:https://www.cnblogs.com/smallredness/p/10684091.html