luogu#P4305. [JLOI2011] 不重复数字
[JLOI2011] 不重复数字
Problem Description
Given numbers, remove the duplicates and keep only the first occurrence of each number.
Input Format
This problem contains multiple test cases.
The first line contains an integer , the number of test cases.
For each test case:
The first line contains an integer .
The second line contains numbers, which are the given numbers.
Output Format
For each test case, output one line containing the remaining numbers after deduplication, separated by a single space.
2
11
1 2 18 3 3 19 2 3 6 5 4
6
1 2 3 4 5 6
1 2 18 3 19 6 5 4
1 2 3 4 5 6
Hint
For of the testdata, , and each given number .
For of the testdata, , and each given number .
For of the testdata, , , and each given number is within the -bit signed integer range.
Translated by ChatGPT 5