

"""simple docstring"""





from __future__ import annotations




class       _lowerCAmelCase						:







 """simple docstring"""







 def __init__(    self							:    Tuple,      UpperCAmelCase__							:    int			):
    __lowercase			=		value
    __lowercase			=		None
    __lowercase			=		None







class       _lowerCAmelCase						:







 """simple docstring"""







 __UpperCAmelCase			:      int


 def __init__(    self							:    Optional[Any]			):
    __lowercase			=		0


 def       _lowercase				(    self							:    Optional[int],      UpperCAmelCase__							:    Node | None,      UpperCAmelCase__							:    int			):
    if node is None:
       return

    if path_sum == self.target:
       self.paths += 1

    if node.left:
       self.depth_first_search(node.left,      path_sum + node.left.value			)
    if node.right:
       self.depth_first_search(node.right,      path_sum + node.right.value			)



 def       _lowercase				(    self							:    List[str],      UpperCAmelCase__							:    Node | None,      UpperCAmelCase__							:    int | None = None			):
    if node is None:
       return 0
    if target is not None:
       __lowercase			=		target

    self.depth_first_search(UpperCAmelCase__,      node.value			)
    self.path_sum(node.left			)
    self.path_sum(node.right			)

    return self.paths


if __name__ == "__main__":
   import doctest

   doctest.testmod()







"""simple docstring"""





def 						_A						(						UpperCamelCase_  : list,    UpperCamelCase_  : list,    UpperCamelCase_  : list,    UpperCamelCase_  : int,    UpperCamelCase_  : int)			->		None:
   '''simple docstring'''


   if target == 0:
      answer.append(path.copy())
   else:
      for index in range(UpperCamelCase_,    len(UpperCamelCase_)):
         if target >= candidates[index]:
            path.append(candidates[index])
            backtrack(UpperCamelCase_,    UpperCamelCase_,    UpperCamelCase_,    target - candidates[index],    UpperCamelCase_)
            path.pop(len(UpperCamelCase_) - 1)




def 						_A						(						UpperCamelCase_  : list,    UpperCamelCase_  : int)			->		list:
   '''simple docstring'''


   __lowercase			=		[]  # type: list[int]
   __lowercase			=		[]  # type: list[int]
   backtrack(UpperCamelCase_,    UpperCamelCase_,    UpperCamelCase_,    UpperCamelCase_,    0)
   return answer




def 						_A						(						)			->		None:
   '''simple docstring'''


   print(combination_sum([-8, 2.3, 0],    1))


if __name__ == "__main__":
   import doctest

   doctest.testmod()
   main()




