#include using std::cout; using std::endl; int Partition( int *R, int low, int high){ // 对记录子序列 R[low..high] 进行一趟快速排序,并返回枢轴记录 // 所在位置,使得在它之前的记录的关键字均不大于它的关键字, // 而在它之后的记录的关键字均不小于它的关键字 R[0] = R[low]; // 将枢轴记录移至数组的闲置分量 int pivotkey = R[low]; // 枢轴记录关键字 cout