#P1059. Unique Sorted Student IDs
Unique Sorted Student IDs
Unique Sorted Student IDs
Ming Ming generated random integers in the range from 1 to 1000 representing student IDs (with ). To ensure experimental objectivity, he removed all duplicate numbers, keeping only one instance for each number. Then, he sorted the unique numbers in ascending order and used this sorted list to select students for his survey. Your task is to remove duplicates from the input and output the sorted list of unique numbers.
inputFormat
The first line of input contains a single integer . The second line contains space-separated integers.
outputFormat
Output the unique numbers in increasing order, separated by a space.
sample
5
3 1 3 2 2
1 2 3