Remove Duplicates from Sorted Array
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Given a sorted array, remove the duplicates such that each element appears only once.
Input
The first line contains the size of array. The second line gives integers in sorted order, each number is no greater than by absolute value.
Output
Print the sorted array with removed duplicates.
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 9K
Acceptance rate 59%