#K36272. Unique Backup Times
Unique Backup Times
Unique Backup Times
Given a list of recorded backup times over several days, your task is to filter out duplicate entries and return the list of unique backup times sorted in ascending order.
The input is provided as an integer n representing the number of backup times, followed by n space-separated integers. The output should be the sorted unique backup times separated by a single space.
In mathematical notation, if the input list is \(T = [t_1, t_2, \dots, t_n]\), you must compute the set \(S = \{ t_i : 1 \le i \le n \}\) and then output the sorted list of elements in \(S\) in ascending order.
inputFormat
The first line contains an integer n (the number of backup times). The second line contains n space-separated integers representing the backup times.
Example:
7 25 42 42 20 25 60 60
outputFormat
Output a single line containing the unique backup times in ascending order, separated by a single space.
Example:
20 25 42 60## sample
4
25 42 20 60
20 25 42 60