为啥在计算 MIN_SORT_GAP 的时候要这样
void get_MSG(int x)
{
multiset<int>::iterator it = b.lower_bound(x);
int w = *it - x;
it--;
w = min(w, x - *it);
MSG = min(MSG, w);
b.insert(x);
}
而不能这样
void get_MSG(int x)
{
multiset<int>::iterator it = b.lower_bound(x);
MSG = min(MSG, min(abs(*it - x), abs(x - *(--it))));
b.insert(x);
}