1548Sort the Integers

1548   Sort the Integers

题目描述

Given N integers, you should sort them in increasing order. For all repetitive integers, you should remove the redundant integers and only keep one of them.

输入格式:

There are multiple test cases. Each case have two lines. The first line is an integer N and there are N integers in the second line which are separated by one blank character.

All integers are positive and no larger than 1000.

输出格式:

For each output case, you should first output the number of remained integers in the first line and all remainded integers in the second line which are separated by one blank character.

输入样例 复制
5
1 3 2 2 4
输出样例 复制
4
1 2 3 4

说明

73
191
通过提交
时空限制1000ms/128mb
题目来源
评测方式在线评测
题目类型
难        度