


def      __lowerCAmelCase    (				snake_case						:     int    ,   snake_case						:     list			)							->				list:
   __lowerCamelCase:					List[str]	 =						sorted(snake_case    ,   key=lambda snake_case			: value[2]    ,   reverse=snake_case			)

   # Create a list of size equal to the maximum deadline
   # and initialize it with -1
   __lowerCamelCase:					Optional[Any]	 =						max(snake_case    ,   key=lambda snake_case			: value[1]			)[1]
   __lowerCamelCase:					Optional[Any]	 =						[-1] * max_deadline

   # Finding the maximum profit and the count of jobs
   __lowerCamelCase:					int	 =						0
   __lowerCamelCase:					Union[str, Any]	 =						0
   for job in jobs:
      # Find a free time slot for this job
      # (Note that we start from the last possible slot)
      for i in range(job[1] - 1    ,   -1    ,   -1			):
         if time_slots[i] == -1:
            __lowerCamelCase:					str	 =						job[0]
            count += 1
            max_profit += job[2]
            break
   return [count, max_profit]


if __name__ == "__main__":
   import doctest

   doctest.testmod()






_A		:					Optional[int]          =							{
    '''+''': lambda x, y: x + y,
    '''-''': lambda x, y: x - y,
    '''*''': lambda x, y: x * y,
    '''/''': lambda x, y: x / y,
}



def      __lowerCAmelCase    (				snake_case						:     Union[str, Any]			)							->				str:
   return c.isdigit()



def      __lowerCAmelCase    (				snake_case						:     Optional[Any]			)							->				str:
   __lowerCamelCase:					List[str]	 =						[]

   # iterate over the string in reverse order
   for c in expression.split()[::-1]:
      # push operand to stack
      if is_operand(snake_case			):
         stack.append(int(snake_case			)			)

      else:
         # pop values from stack can calculate the result
         # push the result onto the stack again
         __lowerCamelCase:					Any	 =						stack.pop()
         __lowerCamelCase:					int	 =						stack.pop()
         stack.append(calc[c](snake_case    ,   snake_case			)			)

   return stack.pop()


# Driver code
if __name__ == "__main__":
   _A		:					int          =							'''+ 9 * 2 6'''
   print(evaluate(test_expression))

   _A		:					str          =							'''/ * 10 2 + 4 1 '''
   print(evaluate(test_expression))


