📅  最后修改于: 2022-03-11 14:44:46.520000             🧑  作者: Mango
#include
vector v = { 6,1,4,5,2,3,0};
sort(v.begin() , v.end()); // {0,1,2,3,4,5,6} sorts ascending
sort(v.begin(), v.end(), greater()); // {6,5,4,3,2,1,0} sorts descending