P2234 [HNOI2002] Turnover Statistics
This question is not written in splay, sin
It is to find the predecessor and successor, and then judge whether this value has appeared or not.
Judgment is the most violent, just take an array to judge
It's just that the value may be negative, so it's fine to translate the whole