


"""simple docstring"""


def   a__			(					__lowercase  ,      __lowercase )						->						list:
				_A       	=      sorted(__lowercase  ,      key=lambda __lowercase : value[2]  ,      reverse=__lowercase )

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

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


if __name__ == "__main__":
		import doctest

		doctest.testmod()



"""simple docstring"""


def   a__			(					__lowercase  ,      __lowercase )						->						Tuple:
				_A       	=      1
				while b > 0:
								if b & 1:
												res *= a

								a *= a
								b >>= 1

				return res






def   a__			(					__lowercase  ,      __lowercase  ,      __lowercase )						->						Optional[Any]:
				_A       	=      1
				while b > 0:
								if b & 1:
												_A       	=      ((res % c) * (a % c)) % c

								a *= a
								b >>= 1

				return res