



# Function to print upper half of diamond (pyramid)












def A__   (					UpperCAmelCase_							):







						for i in range(0  ,  UpperCamelCase__							):
												for _ in range(0  ,  n - i - 1							):  # printing spaces
																		print(' '  ,  end=''							)
												for _ in range(0  ,  i + 1							):  # printing stars
																		print('* '  ,  end=''							)
												print()






def A__   (					UpperCAmelCase_							):







						for i in range(UpperCamelCase__  ,  0  ,  -1							):
												for _ in range(UpperCamelCase__  ,  0  ,  -1							):  # printing stars
																		print('* '  ,  end=''							)
												print()
												for _ in range(n - i + 1  ,  0  ,  -1							):  # printing spaces
																		print(' '  ,  end=''							)






def A__   (					UpperCAmelCase_							):







						if n <= 0:
												print('       ...       ....        nothing printing :('							)
												return
						floyd(UpperCamelCase__							)  # upper half
						reverse_floyd(UpperCamelCase__							)  # lower half


if __name__ == "__main__":
					print(r'| /\ | |- |  |-  |--| |\  /| |-')
					print(r'|/  \| |- |_ |_  |__| | \/ | |_')
					snake_case_			:     Tuple  	=  1
					while K:
										snake_case_			:     Tuple  	=  int(input('enter the number and , and see the magic : '))
										print()
										pretty_print(user_number)
										snake_case_			:     Dict  	=  int(input('press 0 to exit... and 1 to continue...'))

					print('Good Bye...')







'''simple docstring'''
from __future__ import annotations

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

from matplotlib import pyplot as plt






def A__   (					UpperCAmelCase_  ,  UpperCAmelCase_  ,  UpperCAmelCase_							):
						if not arr:
												return None, None, 0
						if low == high:
												return low, high, arr[low]

						_UpperCamelCase :		str			    =       (low + high) // 2
						_UpperCamelCase    ,      _UpperCamelCase    ,      _UpperCamelCase :		Dict			    =       max_subarray(UpperCAmelCase_  ,  UpperCAmelCase_  ,  UpperCAmelCase_							)
						_UpperCamelCase    ,      _UpperCamelCase    ,      _UpperCamelCase :		List[Any]			    =       max_subarray(UpperCAmelCase_  ,  mid + 1  ,  UpperCAmelCase_							)
						_UpperCamelCase    ,      _UpperCamelCase    ,      _UpperCamelCase :		Tuple			    =       max_cross_sum(UpperCAmelCase_  ,  UpperCAmelCase_  ,  UpperCAmelCase_  ,  UpperCAmelCase_							)
						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 A__   (					UpperCAmelCase_  ,  UpperCAmelCase_  ,  UpperCAmelCase_  ,  UpperCAmelCase_							):
						_UpperCamelCase    ,      _UpperCamelCase :		Optional[Any]			    =       float('-inf'							), -1
						_UpperCamelCase    ,      _UpperCamelCase :		int			    =       float('-inf'							), -1

						_UpperCamelCase :		int | float			    =       0
						for i in range(UpperCAmelCase_  ,  low - 1  ,  -1							):
												summ += arr[i]
												if summ > left_sum:
																		_UpperCamelCase :		Optional[int]			    =       summ
																		_UpperCamelCase :		Union[str, Any]			    =       i

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

						return max_left, max_right, (left_sum + right_sum)






def A__   (					UpperCAmelCase_							):
						_UpperCamelCase :		List[str]			    =       [randint(1  ,  UpperCAmelCase_							) for _ in range(UpperCAmelCase_							)]
						_UpperCamelCase :		Optional[Any]			    =       time.time()
						max_subarray(UpperCAmelCase_  ,  0  ,  input_size - 1							)
						_UpperCamelCase :		str			    =       time.time()
						return end - start






def A__   (					):
						_UpperCamelCase :		Any			    =       [1_0, 1_0_0, 1_0_0_0, 1_0_0_0_0, 5_0_0_0_0, 1_0_0_0_0_0, 2_0_0_0_0_0, 3_0_0_0_0_0, 4_0_0_0_0_0, 5_0_0_0_0_0]
						_UpperCamelCase :		Dict			    =       [time_max_subarray(UpperCAmelCase_							) for input_size in input_sizes]
						print('No of Inputs\t\tTime Taken'							)
						for input_size, runtime in zip(UpperCAmelCase_  ,  UpperCAmelCase_							):
												print(UpperCAmelCase_  ,  '\t\t'  ,  UpperCAmelCase_							)
						plt.plot(UpperCAmelCase_  ,  UpperCAmelCase_							)
						plt.xlabel('Number of Inputs'							)
						plt.ylabel('Time taken in seconds'							)
						plt.show()


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

					testmod()


