Submit | All submissions | Best solutions | Back to list |
EIUPH011 - First occurrence |
Given a sequence of n positive integers, output the numbers in the given order provided that the values occur more than once, then output only the first occurrence of it.
Input
The first line is an integer n (n <= 104).
The second line is n positive integers representing the values in the given sequence.
The first line is an integer n (n <= 104).
The second line is n positive integers representing the values in the given sequence.
Output
A single line contains the the first occurrence of each value.
Example
Input: 5
1 2 3 3 2
Output: 1 2 3
Added by: | Ha Minh Ngoc |
Date: | 2015-01-28 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: NCSHARP GOSU JULIA PYPY3 |