##1.输出大于等于key的下标
if(a[mid]>=key) right=mid; else left=mid+1;
if(a[mid]<key) left=mid+1; else if(a[mid]>key) right=mid-1; else return mid;