两次二分查找,一次查是target,一次查不是target def search(self , nums: List[int], target: int) -> int: # write code here l,r = 0,len(nums)-1 while l <= r: mid1 = (l+r)//2 if nums[mid1] == target: while l <= mid1: mid2 = ...