1. 求两个vector 的交集 利用set容器的特性解决
https://www.cnblogs.com/xinyuyuanm/archive/2013/03/30/2990484.html
2.求两vector的不同部分
int main () { using int_v = vector<int>; int_v vec1{1, 3, 6}; int_v vec2{2, 3, 8, 3, 7, 6}; sort (vec1.begin(), vec1.end()); sort (vec2.begin(), vec2.end()); set<int> iset; set_symmetric_difference (vec1.begin() , vec1.end() , vec2.begin() , vec2.end() , inserter( iset, iset.begin())); return 0; }