struct node
{
int a,b;
friend bool operator < (node x,node y)
{
return x.a>y.a;//结构体中a小的优先级高
}
};
priority_queue<node>qu;
优先队列自定义优先级
最新推荐文章于 2024-01-09 16:24:28 发布
struct node
{
int a,b;
friend bool operator < (node x,node y)
{
return x.a>y.a;//结构体中a小的优先级高
}
};
priority_queue<node>qu;