关于operator
  • 板块学术版
  • 楼主IsHPDuwu
  • 当前回复5
  • 已保存回复5
  • 发布时间2023/10/20 21:53
  • 上次更新2023/11/2 12:23:19
查看原帖
关于operator
710036
IsHPDuwu楼主2023/10/20 21:53
struct node
{
	int cc,id;//how long,cost
	friend bool operator<(const node &x,const node &y)
	{
		return x.cc>y.cc;
	}
};

与

struct node
{
	int cc,id;//how long,cost
	friend bool operator<(node x,node y)
	{
		return x.cc>y.cc;
	}
};

都能过

在考场上有什么区别吗

2023/10/20 21:53
加载中...