set题解
2025-10-03 19:20:29
发布于:福建
0阅读
0回复
0点赞
#include <bits/stdc++.h>
using namespace std;
long long n;
int main( ) {
set<long long> s;
cin >> n;
for (int i = 1 ; i <= n ; i++ ) {
long long x;
cin >> x;
s.insert(x);
}
cout << s.size() << endl;
for (auto i : s) cout << i << " ";
return 0;
}
这里空空如也


有帮助,赞一个