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 被卡的屑()
蚌