






"""simple docstring"""







def 							SCREAMING_SNAKE_CASE							(   lowerCamelCase_			,  lowerCamelCase_):
					a__ 							=	sorted(lowerCamelCase_			,  key=lambda lowerCamelCase_: value[2]			,  reverse=lowerCamelCase_)

					# Create a list of size equal to the maximum deadline
					# and initialize it with -1
					a__ 							=	max(lowerCamelCase_			,  key=lambda lowerCamelCase_: 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"""







from __future__ import annotations

from collections.abc import Iterator
from typing import Any







class 							_SCREAMING_SNAKE_CASE    :





							"""simple docstring"""





							def __init__( self:  Optional[int]					,		__A:  Any     ):

												'''simple docstring'''

												a__ 							=	data
												a__ 							=	None





							def __str__( self:  str     ):

												'''simple docstring'''

												return F'{self.data}'







class 							_SCREAMING_SNAKE_CASE    :





							"""simple docstring"""





							def __init__( self:  int     ):

												'''simple docstring'''

												a__ 							=	None
												a__ 							=	None




							def __iter__( self:  Tuple     ):

												'''simple docstring'''

												a__ 							=	self.front
												while node:
																	yield node.data
																	a__ 							=	node.next




							def __len__( self:  Union[str, Any]     ):

												'''simple docstring'''

												return len(tuple(iter(self     )     )     )




							def __str__( self:  Any     ):

												'''simple docstring'''

												return " <- ".join(str(__A     ) for item in self     )




							def 			lowercase		( self:  Any     ):

												'''simple docstring'''

												return len(self     ) == 0




							def 			lowercase		( self:  Tuple					,		__A:  Any     ):

												'''simple docstring'''

												a__ 							=	Node(__A     )
												if self.is_empty():
																	a__ 							=	a__ 							=	node
												else:
																	assert isinstance(self.rear					,		__A     )
																	a__ 							=	node
																	a__ 							=	node




							def 			lowercase		( self:  List[Any]     ):

												'''simple docstring'''

												if self.is_empty():
																	raise IndexError('''dequeue from empty queue'''     )
												assert isinstance(self.front					,		__A     )
												a__ 							=	self.front
												a__ 							=	self.front.next
												if self.front is None:
																	a__ 							=	None
												return node.data





							def 			lowercase		( self:  Dict     ):

												'''simple docstring'''

												a__ 							=	a__ 							=	None


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

	testmod()


