求最长上升、不上升、下降、不下降子序列代码,要O(nlogn)O(n\log n)O(nlogn)用lower_bound/upper_bound写的。
lower_bound
upper_bound
悬一关。