class Solution {
public:
/*
struct cmp{
bool operator()(const pair<int,int> &a, const pair<int,int> &b)
{
return a.second > b.second;
}
};*/
static bool cmp(const pair<int,int> &a, const pair<int,int> &b)
{
return a.second > b.second;
}
vector
这个代码块可以了解怎么在类内定义比较函数传给框架
最新推荐文章于 2023-05-02 15:07:59 发布