


"""simple docstring"""



def     UpperCAmelCase    (					_lowercase   :      list[int]  )	->   tuple[int, int]:


	"""simple docstring"""




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

		# 2 sub problems, 1/2 of original size.
		lowerCAmelCase_       ,  lowerCAmelCase_			       = max_difference(_lowercase  )
		lowerCAmelCase_       ,  lowerCAmelCase_			       = max_difference(_lowercase  )

		# get min of first and max of second
		# linear time
		lowerCAmelCase_			       = min(_lowercase  )
		lowerCAmelCase_			       = 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"""



lowercase_							 =       [0.485, 0.456, 0.406]
lowercase_							 =       [0.229, 0.224, 0.225]
lowercase_							 =       [0.5, 0.5, 0.5]
lowercase_							 =       [0.5, 0.5, 0.5]
lowercase_							 =       [0.4814_5466, 0.457_8275, 0.4082_1073]
lowercase_							 =       [0.2686_2954, 0.2613_0258, 0.2757_7711]