去重函数
#include<bits/stdc++.h>
using namespace std;
int main(void)
{
int a[10] = {5,33,1,0,54,12,213,5,3,7};
sort(a,a+10); //必须排序,只去重相邻相同元素 !
int n = unique(a,a+10) - a; //unique(arr,arr + arr.length()) 返回指针!
for(int i=0;i<n;i++) cout<<a[i]<<" ";
}