#include <iostream> #include <string> #include "stdlib.h" #include "stdio.h" using namespace std; const int ARRSIZE=10000; int partition(int* arr, int low, int high) { int pivot = arr[low]; while(low < high) { while((low < high) && (arr[high] >= pivot)) --high; arr[low] = arr[high]; while((low < high) && (arr[low] <= pivot)) ++low; arr[high] = arr[low]; } arr[low] = pivot; return low; } void quicksort(int* arr, int low, int high) { if((low < high)) { int mid = partition(arr,low,high); if(mid > 0) quicksort(arr,low,mid-1); if(mid < ARRSIZE-1) quicksort(arr,mid+1,high); } else return; } void generateRandom(const char* url) { FILE* f; f = fopen(url,"w"); if(f == NULL) { cout<<"create file error"<<end