





from __future__ import annotations







def    A				(							UpperCAmelCase  ,  UpperCAmelCase				):
					_snake_case       :					list[list[int]]				       =   []
					_snake_case       :					list[int]				       =   []
					_snake_case       :					int				       =   0
					_snake_case       :					Tuple				       =   sum(UpperCAmelCase				)
					create_state_space_tree(UpperCAmelCase  ,  UpperCAmelCase  ,  UpperCAmelCase  ,  UpperCAmelCase  ,  UpperCAmelCase  ,  UpperCAmelCase				)
					return result







def    A				(							UpperCAmelCase  ,  UpperCAmelCase  ,  UpperCAmelCase  ,  UpperCAmelCase  ,  UpperCAmelCase  ,  UpperCAmelCase  ,  ):
					if sum(UpperCAmelCase				) > max_sum or (remaining_nums_sum + sum(UpperCAmelCase				)) < max_sum:
										return
					if sum(UpperCAmelCase				) == max_sum:
										result.append(UpperCAmelCase				)
										return
					for index in range(UpperCAmelCase  ,  len(UpperCAmelCase				)				):
										create_state_space_tree(
										    UpperCAmelCase  ,  UpperCAmelCase  ,  index + 1  ,  [*path, nums[index]]  ,  UpperCAmelCase  ,  remaining_nums_sum - nums[index]  ,  )
__lowerCAmelCase :Optional[int]     =    [3, 34, 4, 12, 5, 2]
__lowerCAmelCase :Dict     =    9
__lowerCAmelCase :Dict     =    generate_sum_of_subsets_soln(nums, max_sum)

print(*result)






from __future__ import annotations

import typing
from collections.abc import Iterable

import numpy as np

__lowerCAmelCase :Union[str, Any]     =    typing.Union[Iterable[float], Iterable[int], np.ndarray]  # noqa: UP007
__lowerCAmelCase :Optional[Any]     =    typing.Union[np.floataa, int, float]  # noqa: UP007







def    A				(							UpperCAmelCase  ,  UpperCAmelCase				):
					return np.sqrt(np.sum((np.asarray(UpperCAmelCase				) - np.asarray(UpperCAmelCase				)) ** 2				)				)







def    A				(							UpperCAmelCase  ,  UpperCAmelCase				):
					return sum((va - va) ** 2 for va, va in zip(UpperCAmelCase  ,  UpperCAmelCase				)				) ** (1 / 2)


if __name__ == "__main__":







							def    A				(							):
												from timeit import timeit

												print("Without Numpy"				)
												print(
												    timeit(
												        "euclidean_distance_no_np([1, 2, 3], [4, 5, 6])"  ,  number=10_000  ,  globals=globals()  ,  )				)
												print("With Numpy"				)
												print(
												    timeit(
												        "euclidean_distance([1, 2, 3], [4, 5, 6])"  ,  number=10_000  ,  globals=globals()  ,  )				)

							benchmark()