백준 - 10867번 : 중복 빼고 정렬하기 (Silver V)
import java.io.*;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
int[] number = new int[2001];
int t = Integer.parseInt(br.readLine());
String[] s = br.readLine().split(" ");
for (int i = 0; i < t; i++) {
int num = Integer.parseInt(s[i]);
number[num + 1000]++;
}
for (int i = 0; i < number.length; i++) {
if (number[i] == 0) continue;
bw.write((i-1000) + " ");
}
bw.flush();
bw.close();
}
}