int main(void)
{
    int iarr1[]={1,2,3,3,4,5,6,7};
    int iarr2[]={1,4,3,3,3,7,8,9,10};
    std::sort(begin(iarr1),end(iarr1));
    std::sort(begin(iarr2),end(iarr2));
    vector<int> ivec(20);  
    auto iter=set_union(begin(iarr1),end(iarr1),begin(iarr2),end(iarr2),ivec.begin());  //ivec为:1,2,3,3,3,4,5,6,7,8,9,10
    ivec.resize(iter-ivec.begin());//重新确定ivec大小
    return 0;
}