如果用lower_bound的个数的话,可以这么写
lower_bound(a+1,a+n+1,x)-a
但是为什么我把数组a换成vector的话就会报错呢?
lower_bound(a.begin(),a.end(),x)-a;