📅  最后修改于: 2022-03-11 14:44:53.914000             🧑  作者: Mango
vectorv ;//ex- v = {7, 3, 8, 3, 2, 8, 8, 5}
sort(v.begin(), v.end()); // v = {2,3,3,5,7,8,8,8}
v.erase(unique(v.begin(), v.end()), v.end());//v= {2, 3, 5, 7, 8}