Sign in $ create-account
~/problems ~/discussion ~/contests ~/submission
← ~/problems
P2011

Sort the Array

Easy
// Description
Sort an array of integers in non-decreasing order.
// Input
The first line contains n (1 <= n <= 10^5). The second line contains n integers (-10^9 <= a_i <= 10^9).
// Output
The sorted integers on a single line, separated by spaces.
// Hint
Any O(n log n) sort works.
// Samples
Sample Input
5
5 3 8 1 2
Sample Output
1 2 3 5 8
// Problem Info
DifficultyEasy
Acceptance50%
Time Limit1000 ms
Memory Limit65536 KB
Accepted5