对结构体进行离散化
  • 板块学术版
  • 楼主0tAp
  • 当前回复2
  • 已保存回复2
  • 发布时间2024/11/6 19:48
  • 上次更新2024/11/6 19:53:10
查看原帖
对结构体进行离散化
758858
0tAp楼主2024/11/6 19:48
struct Line{
	int l,r;
	int len_c;
	bool operator<(const Line &b)const{
		if(l==b.l)xx r<b.r;
		else xx l<b.l;
	}
}line[N],lline[N];

这是我的结构体

sort(lline+1,lline+1+n);
int tot=unique(lline+1,lline+1+n)-lline-1;

unique部分会报错

2024/11/6 19:48
加载中...