


"""simple docstring"""
def 						lowercase				(	_snake_case		: Any	)	->tuple[int, int]:
	"""simple docstring"""





	if len(_lowercase	) == 1:
		return a[0], a[0]
	else:
		# split A into half.
		__snake_case      :		Union[str, Any]         =							a[: len(_lowercase	) // 2]
		__snake_case      :		str         =							a[len(_lowercase	) // 2 :]

		# 2 sub problems, 1/2 of original size.
		__snake_case      :		List[Any]         =							max_difference(_lowercase	)
		__snake_case      :		Dict         =							max_difference(_lowercase	)

		# get min of first and max of second
		# linear time
		__snake_case      :		List[str]         =							min(_lowercase	)
		__snake_case      :		Optional[int]         =							max(_lowercase	)

		# 3 cases, either (small1, big1),
		# (min_first, max_second), (small2, big2)
		# constant comparisons
		if biga - smalla > max_second - min_first and biga - smalla > biga - smalla:
			return smalla, biga
		elif biga - smalla > max_second - min_first:
			return smalla, biga
		else:
			return min_first, max_second


if __name__ == "__main__":
			import doctest

			doctest.testmod()










'''simple docstring'''

from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


_A					:     List[Any]      ={'''configuration_umt5''': ['''UMT5Config''', '''UMT5OnnxConfig''']}


try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		_A					:     Optional[Any]      =[
		    '''UMT5EncoderModel''',
		    '''UMT5ForConditionalGeneration''',
		    '''UMT5ForQuestionAnswering''',
		    '''UMT5Model''',
		    '''UMT5PreTrainedModel''',
		]

if TYPE_CHECKING:
		from .configuration_umta import UMTaConfig, UMTaOnnxConfig

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_umta import (
				    UMTaEncoderModel,
				    UMTaForConditionalGeneration,
				    UMTaForQuestionAnswering,
				    UMTaModel,
				    UMTaPreTrainedModel,
				)
else:
		import sys

		_A					:     Optional[int]      =_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)
