"""simple docstring"""


def        __a (		A     ,					A   ):






     '''simple docstring'''



     for index, item in enumerate(A   ):
          if item == target:
               return index
     return -1







def        __a (		A     ,					A     ,					A     ,					A   ):






     '''simple docstring'''



     if not (0 <= high < len(A   ) and 0 <= low < len(A   )):
          raise Exception("Invalid upper or lower bound!"   )
     if high < low:
          return -1
     if sequence[low] == target:
          return low
     if sequence[high] == target:
          return high
     return rec_linear_search(A     ,					low + 1     ,					high - 1     ,					A   )


if __name__ == "__main__":
 lowerCAmelCase_:       Dict			     =       input("Enter numbers separated by comma:\n").strip()
 lowerCAmelCase_:       List[str]			     =       [int(item.strip()) for item in user_input.split(",")]

 lowerCAmelCase_:       Optional[int]			     =       int(input("Enter a single number to be found in the list:\n").strip())
 lowerCAmelCase_:       Tuple			     =       linear_search(sequence, target)
 if result != -1:
  print(F'linear_search({sequence}, {target}) = {result}')
 else:
  print(F'{target} was not found in {sequence}')





"""simple docstring"""


def        __a (		A     ,					A   ):






     '''simple docstring'''



     lowercase__								=				sorted(A     ,					key=lambda A   : value[2]     ,					reverse=A   )

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

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


if __name__ == "__main__":
 import doctest

 doctest.testmod()




