二分STL

· · 个人记录

在[a+1,a+1+n]中查找第一个大于等于x的元素的坐标:

lower_bound(a+1,a+1+n,x);

在[a+1,a+1+n]中查找第一个大于x的元素的坐标:

upper_bound(a+1,a+1+n,x);