





from __future__ import annotations

snake_case_				=			[-10, -5, 0, 5, 5.1, 11, 13, 21, 3, 4, -21, -10, -5, -1, 0]
snake_case_				=			[-5, 0, 5, 5.1, 11, 13, 21, -1, 4, -1, -10, -5, -1, 0, -1]






def lowerCamelCase__    (							snake_case_	:  list[float]       )      ->				list[float]:
   __snake_case							       =   []
   __snake_case							       =   len(snake_case_       )

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






def lowerCamelCase__    (							snake_case_	:  list[float]       )      ->				list[float]:
   __snake_case							       =   []
   for i, outer in enumerate(snake_case_       ):
      __snake_case							       =   -1
      for inner in arr[i + 1 :]:
         if outer < inner:
            __snake_case							       =   inner
            break
      result.append(snake_case_       )
   return result






def lowerCamelCase__    (							snake_case_	:  list[float]       )      ->				list[float]:
   __snake_case							       =   len(snake_case_       )
   __snake_case							       =   []
   __snake_case							       =   [-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:
         __snake_case							       =   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))

    snake_case_				=			(
        '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),
    )








from math import loga






def lowerCamelCase__    (							snake_case_	:  int       )      ->				int:
   if a < 0:
      raise ValueError('''Input value must be a positive integer'''       )
   elif isinstance(snake_case_       ,      snake_case_       ):
      raise TypeError('''Input value must be a \'int\' type'''       )
   return 0 if (a == 0) else int(loga(a & -a       )       )


if __name__ == "__main__":
    import doctest

    doctest.testmod()

