auto split(int pos) {
auto it = s.lower_bound((Node){pos, 0, 0});
if (it == s.end() || (*it).l == pos)
return it;
it--;
int l = (*it).l, r = (*it).r, v = (*it).v;
s.erase(it);
s.insert((Node){l, pos - 1, v});
return s.insert((Node){pos, r, v}).first;
}
把函数类型改成 set<Node>::iterator 就没事了,有大佬知道原因吗,谢谢