记得特判 s.lower_bound() 是 s.begin() 或 s.end() 的情况。
s.lower_bound()
s.begin()
s.end()
不知道 s.lower_bound() 要开什么类型的变量的,试试 auto
auto
auto p = s.lower_bound(); auto p1 = p--;