重载运算符
  • 板块学术版
  • 楼主IdtwteiNeptune
  • 当前回复4
  • 已保存回复4
  • 发布时间2024/10/16 14:09
  • 上次更新2024/10/16 18:03:26
查看原帖
重载运算符
1395112
IdtwteiNeptune楼主2024/10/16 14:09
struct SMT{
	struct TREE{ LINE lm,rm,sum,mx; int tim; }t[N<<2];
	TREE operator+(const TREE &x,const TREE &y){
		TREE res; res.tim=INF; res.sum=x.sum+y.sum; pli tmp;
		tmp=mer(x.lm,x.sum+y.lm),res.lm=tmp.fi,chkmin(res.tim,tmp.se);
		tmp=mer(y.rm,y.sum+x.rm),res.rm=tmp.fi,chkmin(res.tim,tmp.se);
		tmp=mer(x.mx,y.mx),tmp=mer(tmp.fi,x.rm+y.lm),res.mx=tmp.fi,chkmin(res.tim,tmp.se);
		return res;
	}
};

这个为啥会报错?我该怎么写?

2024/10/16 14:09
加载中...