我的學習紀錄。
1. 比較
bool cmp(<T>& a, <T>& b)
{
return a > b;
}
sort(v.begin(), v.end(), cmp());
Note: cmp 裡面 return 的順序等於希望最終長怎樣的條件
沒有留言:
張貼留言