




def   A		(__A  :       list  ,							__A  :       int  ,							__A  :       int  ,							__A  :       int			)  -> int:







     """simple docstring"""


     UpperCAmelCase_		=				int((lower_bound + upper_bound) // 2			)
     if array[r] == value:
          return r
     if lower_bound >= upper_bound:
          return -1
     if array[r] < value:
          return binary_search(__A  ,							r + 1  ,							__A  ,							__A			)
     else:
          return binary_search(__A  ,							__A  ,							r - 1  ,							__A			)


def   A		(__A  :       int  ,							__A  :       list			)  -> list:







     """simple docstring"""


     UpperCAmelCase_		=				0
     if matrix[index][0] == value:
          return [index, 0]
     while index < len(__A			) and matrix[index][0] < value:
          UpperCAmelCase_		=				binary_search(matrix[index]  ,							0  ,							len(matrix[index]			) - 1  ,							__A			)
          if r != -1:
               return [index, r]
          index += 1
     return [-1, -1]


if __name__ == "__main__":
    import doctest

    doctest.testmod()












def   A		(__A  :       int			)  -> int:







     """simple docstring"""


     if not isinstance(__A  ,							__A			):
          UpperCAmelCase_		=				F"""Input value of [number={number}] must be an integer"""
          raise TypeError(__A			)
     if number < 1:
          raise ValueError('''Input must be a positive integer'''			)
     return number * (2 * number - 1)


if __name__ == "__main__":
    import doctest

    doctest.testmod()






