08-25-2025

This commit is contained in:
e2hang
2025-08-25 21:45:54 +08:00
parent 8edd0f98b5
commit 4e76498908
4 changed files with 41 additions and 11 deletions

View File

@@ -0,0 +1,19 @@
#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;
}