public int[] searchRange(int[] A, int target) {// binary-search bounding version
		int lb = 0, ub = 0;
		int len = A.length;
		int l = 0, r = len - 1, mid = 0;
		while(l <= r){
			mid = (l+r) >> 1;
			if(A[mid] < target) l = mid + 1;
			else r = mid - 1;
		}
		lb = l;
		l = 0; r = len - 1;
		while(l <= r){
			mid = (l+r) >> 1;
			if(A[mid] <= target) l = mid + 1;
			else r = mid - 1;
		}
		ub = r;
		int [] res = new int[]{-1,-1};
		if(lb <= ub){
			res[0] = lb; res[1] = ub;
		}
		return res;
	}