[cpp]
#include <stdio.h>
#include <stdlib.h>
void swap(int *a,int *b)
{
int tmp = *a;
*a = *b;
*b = tmp;
}
//对arr数组做从下标0到下标q的划分
int partition(int *arr,int p,int q)
{
int low = p+1,high = q;
int x = arr[p];
while(low<high)
{
if(a[......]