





from __future__ import annotations

def      UpperCAmelCase_    (    _UpperCAmelCase							:list[int]  ,						_UpperCAmelCase							:int				)	->				list[list[int]]:
     '''simple docstring'''


     A_          =       []
     A_          =       []
     A_          =       0
     A_          =       sum(_UpperCAmelCase				)
     create_state_space_tree(_UpperCAmelCase  ,						_UpperCAmelCase  ,						_UpperCAmelCase  ,						_UpperCAmelCase  ,						_UpperCAmelCase  ,						_UpperCAmelCase				)
     return result

def      UpperCAmelCase_    (    _UpperCAmelCase							:list[int]  ,						_UpperCAmelCase							:int  ,						_UpperCAmelCase							:int  ,						_UpperCAmelCase							:list[int]  ,						_UpperCAmelCase							:list[list[int]]  ,						_UpperCAmelCase							:int  ,						)	->				None:
     '''simple docstring'''


     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]  ,						)
a__      :     Tuple         =		[3, 34, 4, 12, 5, 2]
a__      :     int         =		9
a__      :     List[Any]         =		generate_sum_of_subsets_soln(nums, max_sum)


print(*result)










from __future__ import annotations

def      UpperCAmelCase_    (    _UpperCAmelCase							:list[float]  ,						_UpperCAmelCase							:list[float]				)	->				float:
     '''simple docstring'''


     A_          =       sorted(numsa + numsa				)
     A_   ,    A_          =       divmod(len(_UpperCAmelCase				)  ,						2				)
     if mod == 1:
          return all_numbers[div]
     else:
          return (all_numbers[div] + all_numbers[div - 1]) / 2


if __name__ == "__main__":
      import doctest

      doctest.testmod()
      a__      :     Optional[Any]         =		[float(x) for x in input('Enter the elements of first array: ').split()]
      a__      :     int         =		[float(x) for x in input('Enter the elements of second array: ').split()]
      print(f'''The median of two arrays is: {median_of_two_arrays(array_a, array_a)}''')



