




from __future__ import annotations

import time
from collections.abc import Sequence
from random import randint

from matplotlib import pyplot as plt




def     __magic_name__       (				A	:      Sequence[float],						A	:      int,						A	:      int     ):






			'''simple docstring'''







			if not arr:
						return None, None, 0
			if low == high:
						return low, high, arr[low]

			a					=    (low + high) // 2
			a					,	a					,	a					=    max_subarray(A,						A,						A     )
			a					,	a					,	a					=    max_subarray(A,						mid + 1,						A     )
			a					,	a					,	a					=    max_cross_sum(A,						A,						A,						A     )
			if left_sum >= right_sum and left_sum >= cross_sum:
						return left_low, left_high, left_sum
			elif right_sum >= left_sum and right_sum >= cross_sum:
						return right_low, right_high, right_sum
			return cross_left, cross_right, cross_sum




def     __magic_name__       (				A	:      Sequence[float],						A	:      int,						A	:      int,						A	:      int     ):






			'''simple docstring'''







			a					,	a					=    float("-inf"     ), -1
			a					,	a					=    float("-inf"     ), -1

			a					=    0
			for i in range(A,						low - 1,						-1     ):
						summ += arr[i]
						if summ > left_sum:
									a					=    summ
									a					=    i

			a					=    0
			for i in range(mid + 1,						high + 1     ):
						summ += arr[i]
						if summ > right_sum:
									a					=    summ
									a					=    i

			return max_left, max_right, (left_sum + right_sum)




def     __magic_name__       (				A	:      int     ):






			'''simple docstring'''







			a					=    [randint(1,						A     ) for _ in range(A     )]
			a					=    time.time()
			max_subarray(A,						0,						input_size - 1     )
			a					=    time.time()
			return end - start




def     __magic_name__       (				):






			'''simple docstring'''







			a					=    [10, 100, 1000, 10000, 50000, 100000, 200000, 300000, 400000, 500000]
			a					=    [time_max_subarray(A     ) for input_size in input_sizes]
			print("No of Inputs\t\tTime Taken"     )
			for input_size, runtime in zip(A,						A     ):
						print(A,						"\t\t",						A     )
			plt.plot(A,						A     )
			plt.xlabel("Number of Inputs"     )
			plt.ylabel("Time taken in seconds"     )
			plt.show()


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

		testmod()












__lowerCAmelCase	:       List[Any]     =	{str(digit): digit**5 for digit in range(10)}




def     __magic_name__       (				A	:      int     ):






			'''simple docstring'''







			return sum(DIGITS_FIFTH_POWER[digit] for digit in str(A     )     )




def     __magic_name__       (				):






			'''simple docstring'''







			return sum(
			    number
			    for number in range(1000,						1000000     )
			    if number == digits_fifth_powers_sum(A     )     )


if __name__ == "__main__":
		print(solution())






