STL--set
KiKi去重整数并排序
http://www.nowcoder.com/questionTerminal/f59b914172b94c69a2b29ad0a1d9b1a7
C++ 中好用的STL --- set
#include<iostream> #include<algorithm> #include<set> using namespace std; int main() { set<int> a; int n; cin >> n; for(int i=0;i<n;i++) { int x; cin >> x; a.insert(x); } for (auto x: a) cout << x << " "; return 0; }