The unique function is a function used to remove duplicate elements from a collection
If it is in an array, after calling this function, the place where the next pointer to remove the duplicate elements is returned.
If it is in a vector, it will return the iterator of the next position of the repeated element. After calling the erase function, the real deletion
sort(v.begin(), v.end(), cmp); v.erase(unique(v.begin(), v.end()), v.end());