We all know that when using stl sort can be used to sort (konjac money) , but we can also learn a useful function unique ( deletes all adjacent duplicate sequence elements ) .
sort(a,a+t);
unique(a,a+t);
Of course, because it is deleted sequence in all adjacent duplicate elements, then we should go before heavy, with sort ordering it again, then you can complete the ordering + go heavier.