menu ZJOJ
account_circle 请登录
home
首页
book
题目
apps
分类
play_circle_outline
状态
assessment
竞赛
assignment
作业
equalizer
排名
assignment_ind
登录
person_add
注册
1546: 排序去重问题
时间限制:1.000s
内存限制:128MB

题目描述

给定一个大小为lns="http://www.w3.org/1998/Math/MathML">n的数组lns="http://www.w3.org/1998/Math/MathML">a,请将lns="http://www.w3.org/1998/Math/MathML">a中元素去重后从小到大排序输出。

输入格式

第一行一个整数lns="http://www.w3.org/1998/Math/MathML">T表示测试样例个数。lns="http://www.w3.org/1998/Math/MathML">(1 \le T \le 100)

对于每一个测试样例:

第一行一个整数lns="http://www.w3.org/1998/Math/MathML">n表示数组大小。lns="http://www.w3.org/1998/Math/MathML">(1 \le n \le 10^3)

第二行lns="http://www.w3.org/1998/Math/MathML">n个整数表示数组元素。lns="http://www.w3.org/1998/Math/MathML">(1 \le a_i \le 500)

输出格式

对于每个样例,在一行输出结果后换行。

样例输入 content_copy

2
5
1 1 3 2 2
3
1 2 3

样例输出 content_copy

1 2 3
1 2 3