yes
Time Limit: 1 seconds
Memory Limit: 256 MB
Rating: 800
Problem StatementGiven an array of $N$ sorted integers $A$, output $A$, with any duplicate entries removed, such that there is only one entry remaining of that integer. See sample cases for more details.
InputThe first line contains integer $N$ $(1 \le N \le 1000)$ The next $N$ lines contain integers $A_i$ $(-10^9 \le A_i \le 10^9)$
OutputOutput each entry in $A$ in ascending order without any duplicate entries on separate lines.
Sample CasesSample Input 1: 3 1 2 2 Sample Output 1: 1 2 Sample Input 2: 7 100000 100000 100000 1000000 2000000 3000000 3000000 Sample Output 2: 100000 1000000 2000000 3000000Explanation
Make sure to output in ascending order.
Sourcesadmin@ian@
Submit | Back