C ++ sorting and de-emphasis

     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.

Guess you like

Origin www.cnblogs.com/bolerat/p/11373690.html