蒟蒻求助(如下)
想在数组里查找一个小于等于x的最大值,返回他的下标,用lower_bound 或 upper_bound 怎么写。
while(l<r){ mid=(l+r)>>1; if(s[mid]<=x)l=mid; else r=mid-1; }