# zoj 2481 Unique Ascending Array

//这题主要是在给出的数组中找出不重复的数，并按升序的顺序排序起来！很简单！
#include "iostream"
#include "algorithm"
#include "memory.h"
using namespace std;

int num[110], ans[110];
int main()
{
int N, i, j;
while (cin >> N && N)
{
memset(num, 0, sizeof(num));
memset(ans, 0, sizeof(ans));
for (i = 0; i < N; i++)
cin >> num[i];
sort(num, num + N);
ans[0] = num[0];
for (i = 1, j = 1; i < N; i++)
{
if (num[i] != num[i-1])
{
ans[j] = num[i];
j++;
}
}
for (i = 0; i < j; i++)
{
if (i != 0)
cout << " ";
cout << ans[i];
}
cout << endl;
}
}


#### ZOJ 2481 Unique Ascending Array

2014-05-28 13:27:38

#### ZOJ 2481 Unique Ascending Array

2013-03-22 21:55:48

#### ZOJ 2481 Unique Ascending Array

2017-04-19 13:27:08

#### zoj 2481 Unique Ascending Array(water still~)

2011-01-19 12:02:00

#### zoj Unique Ascending Array

2013-11-24 22:58:01

#### zoj2481 Unique Ascending Array

2015-07-26 12:34:45

#### ZOJ2481 Unique Ascending Array

2017-04-18 23:08:48

#### zoj_2481 Unique Ascending Array

2013-05-28 17:25:31

#### leetcode_167. Two Sum II - Input array is sorted 有序数组中找和为特定数的两个数的下标

2016-11-12 22:05:52

#### LeetCode 167. Two Sum II - Input array is sorted 题解（C++）

2016-10-07 17:21:31