




def 		a_       (   __lowerCAmelCase      ,   __lowerCAmelCase							):
  lowerCAmelCase__								=			sorted(__lowerCAmelCase      ,   key=lambda __lowerCAmelCase							: value[2]      ,   reverse=__lowerCAmelCase							)

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

  # Finding the maximum profit and the count of jobs
  lowerCAmelCase__								=			0
  lowerCAmelCase__								=			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__								=			job[0]
        count += 1
        max_profit += job[2]
        break
  return [count, max_profit]


if __name__ == "__main__":
      import doctest

      doctest.testmod()







def 		a_       (   __lowerCAmelCase      ,   __lowerCAmelCase							):
  assert isinstance(__lowerCAmelCase      ,   __lowerCAmelCase							), F"""The input value of [set_a={set_a}] is not a set"""
  assert isinstance(__lowerCAmelCase      ,   __lowerCAmelCase							), F"""The input value of [set_b={set_b}] is not a set"""

  return {a + b for a in set_a for b in set_b}


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

      testmod()

