


def 	_lowerCAmelCase  (							lowerCAmelCase_							:Union[str, Any]						,  lowerCAmelCase_							:Any							)->list:
   '''simple docstring'''






   snake_case_         =   sorted(snake_case__						,  key=lambda lowerCAmelCase_							: value[2]						,  reverse=snake_case__							)

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

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


if __name__ == "__main__":
   import doctest

   doctest.testmod()








from __future__ import annotations



def      _lowerCAmelCase  (							lowerCAmelCase_							:int							)->list[int]:
   '''simple docstring'''






   assert (
       isinstance(lowerCAmelCase_						,  lowerCAmelCase_							) and mask > 0
   ), F'''mask needs to be positive integer, your input {mask}'''
   snake_case_         =   []
   snake_case_         =   mask

   while submask:
      all_submasks.append(lowerCAmelCase_							)
      snake_case_         =   (submask - 1) & mask

   return all_submasks


if __name__ == "__main__":
   import doctest

   doctest.testmod()




