
'''simple docstring'''
import math







def        A_     (						__SCREAMING_SNAKE_CASE						:  int )				->       Any:





  """simple docstring"""

  __A		:     Union[str, Any]												=		math.loga(math.sqrt(4 * positive_integer + 1 ) / 2 + 1 / 2 )

  return exponent == int(__SCREAMING_SNAKE_CASE )







def        A_     (						__SCREAMING_SNAKE_CASE						:  float = 1 / 1_2345 )				->       str:





  """simple docstring"""

  __A		:     List[Any]												=		0
  __A		:     Any												=		0

  __A		:     str												=		3
  while True:
    __A		:     Tuple												=		(integer**2 - 1) / 4
    # if candidate is an integer, then there is a partition for k
    if partition_candidate == int(__SCREAMING_SNAKE_CASE ):
      __A		:     Optional[Any]												=		int(__SCREAMING_SNAKE_CASE )
      total_partitions += 1
      if check_partition_perfect(__SCREAMING_SNAKE_CASE ):
        perfect_partitions += 1
    if perfect_partitions > 0:
      if perfect_partitions / total_partitions < max_proportion:
        return int(__SCREAMING_SNAKE_CASE )
    integer += 1


if __name__ == "__main__":
 print(F"{solution() = }")





'''simple docstring'''
from collections.abc import Sequence







def        A_     (						__SCREAMING_SNAKE_CASE						:  Sequence[float]			,     __SCREAMING_SNAKE_CASE						:  bool = False )				->       float:





  """simple docstring"""

  if not arr:
    return 0

  __A		:     Any												=		0 if allow_empty_subarrays else float("""-inf""" )
  __A		:     List[Any]												=		0.0
  for num in arr:
    __A		:     Tuple												=		max(0 if allow_empty_subarrays else num			,     curr_sum + num )
    __A		:     Optional[int]												=		max(__SCREAMING_SNAKE_CASE			,     __SCREAMING_SNAKE_CASE )

  return max_sum


if __name__ == "__main__":
     from doctest import testmod

     testmod()

     A__   :		Any 		=[-2, 1, -3, 4, -1, 2, 1, -5, 4]
     print(F"{max_subarray_sum(nums) = }")



