Submit | All submissions | Best solutions | Back to list |
EIUONCE - Distinct value |
Given n integers a0 , a1 ,..., an-1 .Print all distinct elements of the given list in increasing order
Input
+ The first line is the number of testcases T (1 <= T <= 10). Each line in the following T lines describes a test case:
+ Each test case starts with a positive integer n and the sequence a0, a1, ..., an-1. Numbers are separated by a space.
Output
The sequence of distinct values. The numbers are sorted in ascending order and separated by a space.
Example
Input: 2 5 1 2 3 4 4 5 5 4 9 10 2 Output: 1 2 3 2 4 5 9 10