"""simple docstring"""



from __future__ import annotations

def  _A(		lowerCAmelCase			,  lowerCAmelCase			,  lowerCAmelCase			,  lowerCAmelCase							):
							if (direction == 1 and array[indexa] > array[indexa]) or (
							    direction == 0 and array[indexa] < array[indexa]
							):
														A__				,							A__       :     List[str]								=			array[indexa], array[indexa]

def  _A(		lowerCAmelCase			,  lowerCAmelCase			,  lowerCAmelCase			,  lowerCAmelCase							):
							if length > 1:
														A__       :     int								=			int(length / 2							)
														for i in range(lowerCAmelCase			,  low + middle							):
																					comp_and_swap(lowerCAmelCase			,  lowerCAmelCase			,  i + middle			,  lowerCAmelCase							)
														bitonic_merge(lowerCAmelCase			,  lowerCAmelCase			,  lowerCAmelCase			,  lowerCAmelCase							)
														bitonic_merge(lowerCAmelCase			,  low + middle			,  lowerCAmelCase			,  lowerCAmelCase							)

def  _A(		lowerCAmelCase			,  lowerCAmelCase			,  lowerCAmelCase			,  lowerCAmelCase							):
							if length > 1:
														A__       :     Union[str, Any]								=			int(length / 2							)
														bitonic_sort(lowerCAmelCase			,  lowerCAmelCase			,  lowerCAmelCase			,  1							)
														bitonic_sort(lowerCAmelCase			,  low + middle			,  lowerCAmelCase			,  0							)
														bitonic_merge(lowerCAmelCase			,  lowerCAmelCase			,  lowerCAmelCase			,  lowerCAmelCase							)


if __name__ == "__main__":
				_UpperCamelCase								=		input("Enter numbers separated by a comma:\n").strip()
				_UpperCamelCase								=		[int(item.strip()) for item in user_input.split(",")]

				bitonic_sort(unsorted, 0, len(unsorted), 1)
				print("\nSorted array in ascending order is: ", end="")
				print(*unsorted, sep=", ")

				bitonic_merge(unsorted, 0, len(unsorted), 0)
				print("Sorted array in descending order is: ", end="")
				print(*unsorted, sep=", ")






"""simple docstring"""



from collections.abc import Sequence

def  _A(		lowerCAmelCase			,  lowerCAmelCase							):
							return sum(c * (x**i) for i, c in enumerate(lowerCAmelCase							)							)

def  _A(		lowerCAmelCase			,  lowerCAmelCase							):
							A__       :     str								=			0.0
							for coeff in reversed(lowerCAmelCase							):
														A__       :     Optional[int]								=			result * x + coeff
							return result


if __name__ == "__main__":
				_UpperCamelCase								=		(0.0, 0.0, 5.0, 9.3, 7.0)
				_UpperCamelCase								=		10.0
				print(evaluate_poly(poly, x))
				print(horner(poly, x))





