20 lines
302 B
C++
20 lines
302 B
C++
#include <iostream>
|
|
#include <set>
|
|
using namespace std;
|
|
int main(){
|
|
set<int> s;
|
|
int n;
|
|
cin >> n;
|
|
int tmp;
|
|
for(int i = 0; i < n; i++){
|
|
cin >> tmp;
|
|
s.emplace(tmp);
|
|
}
|
|
cout << s.size() << endl;
|
|
for(auto it = s.begin(); it != s.end(); it++){
|
|
cout << *it << " ";
|
|
}
|
|
cout << endl;
|
|
return 0;
|
|
}
|