Gửi bài giải
Điểm:
1,00 (OI)
Giới hạn thời gian:
1.0s
Giới hạn bộ nhớ:
256M
Input:
stdin
Output:
stdout
Nguồn bài:
Dạng bài
Ngôn ngữ cho phép
C, C++, Java, Kotlin, Pascal, PyPy, Python, Scratch
Given n integers ~a_{0}, a_{1}, \ldots, a_{n-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 ~a_{0}, a_{1}, \ldots, a_{n-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.
Sample Input:
2
5 1 2 3 4 4
5 5 4 9 10 2
Sample Output:
1 2 3
2 4 5 9 10
Bình luận