F - 数据结构实验之排序八:快速排序
Description
给定N(N≤10^5)个整数,要求用快速排序对数据进行升序排列,注意不得使用STL。
Input
输入数据第一行给出正整数N(≤10^5),随后给出N个整数,数字间以空格分隔。
Output
输出排序后的结果,数字间以一个空格间隔,行末不得有多余空格。
Input
8
49 38 65 97 76 13 27 49
Output
13 27 38 49 49 65 76 97
#include <iostream>
#include <bits/stdc++.h>
using namespace std;
void sqort(int a[],int l,int r)
{
int key=a[l];//定义a[l]就是要比较的对象;
int i