1820: 【CSP数组】去除重复数字█

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:9 Solved:2

Description

给你 lns="http://www.w3.org/1998/Math/MathML">N 个数(lns="http://www.w3.org/1998/Math/MathML">N100),每个数都在(lns="http://www.w3.org/1998/Math/MathML">01000)之间,其中由很多重复的数字,请将重复的数字只保留一个,并将剩下的数由小到大排序并输出。

Input

输入有 lns="http://www.w3.org/1998/Math/MathML">2 行;

第 lns="http://www.w3.org/1998/Math/MathML">1 行为 lns="http://www.w3.org/1998/Math/MathML">1 个正整数,表示数的个数:lns="http://www.w3.org/1998/Math/MathML">N

第 lns="http://www.w3.org/1998/Math/MathML">2 行有 lns="http://www.w3.org/1998/Math/MathML">N 个用空格隔开的整数。

Output

第 lns="http://www.w3.org/1998/Math/MathML">1 行为 lns="http://www.w3.org/1998/Math/MathML">1 个正整数 lns="http://www.w3.org/1998/Math/MathML">M,表示不相同数的个数。

接下来的 lns="http://www.w3.org/1998/Math/MathML">M 行,每行一个整数,表示从小到大排好序的不相同的数。

Sample Input Copy

10
20 40 32 67 40 20 89 300 400 15

Sample Output Copy

8
15
20
32
40
67
89
300
400