最逆天的错误
查看原帖
最逆天的错误
678858
ShiRoZeTsuHL卜奎BBQ!楼主2023/11/23 14:48

AC:

struct pr {
	int x, y;
	bool operator < (const pr& p) const {
		if(x != p.x) return x < p.x;
		return y < p.y;
	}
} stk[maxm];

WA :

struct pr {
	int x, y;
	bool operator < (const pr& p) const {
		if(x == p.x) return x < p.x;
		return y < p.y;
	}
} stk[maxm];

由于重载运算符写错,导致 map 被卡的屑()

蚌

2023/11/23 14:48
加载中...