快速排序


Submit solution

Points: 100
Time limit: 1.0s
Memory limit: 4M

Author:
Problem type
Allowed languages
C, C++

快速排序

题目描述

将读入的 \(N\) 个数从小到大排序后输出。

输入格式

第一行为一个正整数 \(N\)。

第二行包含 \(N\) 个空格隔开的正整数 \(a_i\),为你需要进行排序的数。

输出格式

将给定的 \(N\) 个数从小到大输出,数之间空格隔开,行末换行且无空格。

输入输出样例 #1

输入 #1
5
4 2 4 5 1
输出 #1
1 2 4 4 5

说明/提示

对于 \(20\%\) 的数据,有 \(1 \leq N \leq 10^3\);

对于 \(100\%\) 的数据,有 \(1 \leq N \leq 10^5\),\(1 \le a_i \le 10^9\)。


Comments

There are no comments at the moment.