#include#include #include using namespace std; int random(int a,int b) { srand(NULL); return rand()%(b-a)+a; } void exchange(int &a,int &b) { int temp; temp=a; a=b; b=temp; } int partition(int *a,int p,int r) { int x=a[r]; int i=p-1; for (int j=p;j