1 #include <algorithm> 2 //vector排序去重 3 sort( BoxNum.begin(), BoxNum.end()); 4 BoxNum.erase(unique(BoxNum.begin(), BoxNum.end()), BoxNum.end());
1 //逆向排序:按照从大到小的顺序进行排序 2 sort(DeleteAll.rbegin(), DeleteAll.rend());
//vector反向排序
reverse(points.begin(), points.end());