






"""simple docstring"""




from __future__ import annotations

def 			lowerCAmelCase__     (     UpperCamelCase__     ,   UpperCamelCase__     ,   UpperCamelCase__				):



  '''simple docstring'''
  if len(UpperCamelCase__				) == 0:
    raise ValueError("""find_max() arg is an empty sequence"""				)
  if (
      left >= len(UpperCamelCase__				)
      or left < -len(UpperCamelCase__				)
      or right >= len(UpperCamelCase__				)
      or right < -len(UpperCamelCase__				)
  ):
    raise IndexError("""list index out of range"""				)
  if left == right:
    return nums[left]
  _a  :       List[Any]             =	(left + right) >> 1  # the middle
  _a  :       Optional[Any]             =	find_max(UpperCamelCase__     ,   UpperCamelCase__     ,   UpperCamelCase__				)  # find max in range[left, mid]
  _a  :       int             =	find_max(UpperCamelCase__     ,   mid + 1     ,   UpperCamelCase__				)  # find max in range[mid + 1, right]

  return left_max if left_max >= right_max else right_max


if __name__ == "__main__":
 import doctest

 doctest.testmod(verbose=True)









"""simple docstring"""




def 			lowerCAmelCase__     (     UpperCamelCase__     ,   UpperCamelCase__				):



  '''simple docstring'''

  # Check if the input is valid
  if not len(UpperCamelCase__				) == len(UpperCamelCase__				) == 3:
    raise ValueError("""Please enter a valid equation."""				)
  if equationa[0] == equationa[1] == equationa[0] == equationa[1] == 0:
    raise ValueError("""Both a & b of two equations can't be zero."""				)

  # Extract the coefficients
  _a      ,  _a      ,  _a  :       Any             =	equationa
  _a      ,  _a      ,  _a  :       Tuple             =	equationa

  # Calculate the determinants of the matrices
  _a  :       int             =	aa * ba - aa * ba
  _a  :       str             =	ca * ba - ca * ba
  _a  :       str             =	aa * ca - aa * ca

  # Check if the system of linear equations has a solution (using Cramer's rule)
  if determinant == 0:
    if determinant_x == determinant_y == 0:
      raise ValueError("""Infinite solutions. (Consistent system)"""				)
    else:
      raise ValueError("""No solution. (Inconsistent system)"""				)
  else:
    if determinant_x == determinant_y == 0:
      # Trivial solution (Inconsistent system)
      return (0.0, 0.0)
    else:
      _a  :       Dict             =	determinant_x / determinant
      _a  :       str             =	determinant_y / determinant
      # Non-Trivial Solution (Consistent system)
      return (x, y)

