



def 	_A	(   _UpperCamelCase      ,					_UpperCamelCase			):
				_UpperCAmelCase						:  List[str]     					=	sorted(_UpperCamelCase      ,					key=lambda _UpperCamelCase			: value[2]      ,					reverse=_UpperCamelCase			)

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

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


if __name__ == "__main__":
					import doctest

					doctest.testmod()





def 	_A	(   _UpperCamelCase			):
				if not isinstance(_UpperCamelCase      ,					_UpperCamelCase			):
								_UpperCAmelCase						:  List[Any]     					=	(
								    '''operation can not be conducted on a object of type '''
								    F'''{type(_UpperCamelCase			).__name__}'''
								)
								raise TypeError(_UpperCamelCase			)
				_UpperCAmelCase						:  List[str]     					=	''''''
				for _ in range(0      ,					32			):
								bit_string += str(number % 2			)
								_UpperCAmelCase						:  Union[str, Any]     					=	number >> 1
				return bit_string


def 	_A	(   _UpperCamelCase			):
				if number < 0:
								raise ValueError('''the value of input must be positive'''			)
				elif isinstance(_UpperCamelCase      ,					_UpperCamelCase			):
								raise TypeError('''Input value must be a \'int\' type'''			)
				elif isinstance(_UpperCamelCase      ,					_UpperCamelCase			):
								raise TypeError('''\'<\' not supported between instances of \'str\' and \'int\''''			)
				_UpperCAmelCase						:  Tuple     					=	0
				# iterator over [1 to 32],since we are dealing with 32 bit integer
				for _ in range(1      ,					33			):
								# left shift the bits by unity
								_UpperCAmelCase						:  List[str]     					=	result << 1
								# get the end bit
								_UpperCAmelCase						:  List[Any]     					=	number % 2
								# right shift the bits by unity
								_UpperCAmelCase						:  Optional[int]     					=	number >> 1
								# add that bit to our ans
								_UpperCAmelCase						:  Any     					=	result | end_bit
				return get_reverse_bit_string(_UpperCamelCase			)


if __name__ == "__main__":
					import doctest

					doctest.testmod()
