Sort Numbers 2
Time limit2sMemory limit256 MB
Read up to one million distinct integers and print them in ascending order.
- Level
Easy2 of 10
- Topics
- Sorting, Implementation
- Solved
- No attempts yet
Problem
You are given N integers. Write a program that prints them in ascending order.
Input
The first line contains the number of integers N. (1 <= N <= 1,000,000)
Each of the next N lines contains one integer. The absolute value of each integer is at most 1,000,000, and all given integers are distinct.
Output
Print the sorted integers in ascending order, one per line, starting from the first line.