#C12979. Remove Duplicates and Sort
Remove Duplicates and Sort
Remove Duplicates and Sort
You are given an array of n integers. Your task is to remove all duplicate numbers and then sort the remaining numbers in ascending order. Additionally, you must measure the execution time in milliseconds. For the purpose of deterministic judging, always output 0.000
as the execution time.
Note: The input will be provided via stdin
and the output must be printed to stdout
.
Example:
Input: 7 4 5 6 4 3 2 1</p>Output: 1 2 3 4 5 6 0.000
inputFormat
The first line contains an integer n
representing the number of integers in the array. The second line contains n
space-separated integers.
Example:
7 4 5 6 4 3 2 1
outputFormat
Print two lines:
- The first line must contain the sorted unique integers separated by a space.
- The second line must print the execution time in milliseconds. For judging purposes, always print
0.000
.
Example Output:
1 2 3 4 5 6 0.000## sample
7
4 5 6 4 3 2 1
1 2 3 4 5 6
0.000
</p>