
"""simple docstring"""




from __future__ import annotations

_A     :			Tuple  						=			[-10, -5, 0, 5, 5.1, 11, 13, 21, 3, 4, -21, -10, -5, -1, 0]
_A     :			Optional[Any]  						=			[-5, 0, 5, 5.1, 11, 13, 21, -1, 4, -1, -10, -5, -1, 0, -1]


def     __magic_name__      ( __snake_case							:			list[float]    )					->							list[float]:
       lowercase       :							Dict									=				[]
       lowercase       :							int									=				len(__snake_case    )

       for i in range(__snake_case    ):
              lowercase       :							float									=				-1
              for j in range(i + 1	,					__snake_case    ):
                     if arr[i] < arr[j]:
                            lowercase       :							Union[str, Any]									=				arr[j]
                            break
              result.append(__snake_case    )
       return result


def     __magic_name__      ( __snake_case							:			list[float]    )					->							list[float]:
       lowercase       :							List[str]									=				[]
       for i, outer in enumerate(__snake_case    ):
              lowercase       :							float									=				-1
              for inner in arr[i + 1 :]:
                     if outer < inner:
                            lowercase       :							Optional[int]									=				inner
                            break
              result.append(__snake_case    )
       return result


def     __magic_name__      ( __snake_case							:			list[float]    )					->							list[float]:
       lowercase       :							str									=				len(__snake_case    )
       lowercase       :							list[float]									=				[]
       lowercase       :							list[float]									=				[-1] * arr_size

       for index in reversed(range(__snake_case    )    ):
              if stack:
                     while stack[-1] <= arr[index]:
                            stack.pop()
                            if not stack:
                                   break
              if stack:
                     lowercase       :							str									=				stack[-1]
              stack.append(arr[index]    )
       return result


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

   testmod()
   print(next_greatest_element_slow(arr))
   print(next_greatest_element_fast(arr))
   print(next_greatest_element(arr))

   _A     :			Any  						=			(
       """from __main__ import arr, next_greatest_element_slow, """
       """next_greatest_element_fast, next_greatest_element"""
   )
   print(
       """next_greatest_element_slow():""",
       timeit("""next_greatest_element_slow(arr)""", setup=setup),
   )
   print(
       """next_greatest_element_fast():""",
       timeit("""next_greatest_element_fast(arr)""", setup=setup),
   )
   print(
       """     next_greatest_element():""",
       timeit("""next_greatest_element(arr)""", setup=setup),
   )




"""simple docstring"""




def     __magic_name__      ( __snake_case							:			int	,					__snake_case							:			int    )					->							Any:
       if b == 0:
              return 1
       if (b % 2) == 0:
              return actual_power(__snake_case	,					int(b / 2    )    ) * actual_power(__snake_case	,					int(b / 2    )    )
       else:
              return a * actual_power(__snake_case	,					int(b / 2    )    ) * actual_power(__snake_case	,					int(b / 2    )    )


def     __magic_name__      ( __snake_case							:			int	,					__snake_case							:			int    )					->							float:
       if b < 0:
              return 1 / actual_power(__snake_case	,					__snake_case    )
       return actual_power(__snake_case	,					__snake_case    )


if __name__ == "__main__":
   print(power(-2, -3))


