67. Sort

Time Limit: 1 seconds

Memory Limit: 1024 MB

Rating: 800

Problem Statement

Sort an array A consisting of N integers (1N105,109Ai109) in ascending order.

Subtasks:
Task 1 (10 points): N1,000
Task 2 (90 points): No additional constraints.

Input

The first line has integer N.
The second line has N space-separated integers, forming an array A.

Output

Output the sorted array as shown in the sample cases.

Sample Cases
Sample Input 1:
4
2 3 4 1

Sample Output 1:
1 2 3 4


Sample Input 2:
3
-1000 40 -400

Sample Output 2:
-1000 -400 40
Explanation

Not available for this problem.

Sources

ian

Submit | Back