



"""simple docstring"""






from __future__ import annotations


def     _lowercase       (						__snake_case      ,__snake_case			)		->     list[list[int]]:
			__lowerCAmelCase   :						list[list[int]]				= []
			__lowerCAmelCase   :						list[int]				= []
			__lowerCAmelCase   :						Optional[Any]				= 0
			__lowerCAmelCase   :						Optional[Any]				= sum(__snake_case			)
			create_state_space_tree(__snake_case      ,__snake_case      ,__snake_case      ,__snake_case      ,__snake_case      ,__snake_case			)
			return result


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





print(*result)




"""simple docstring"""






import unittest

from knapsack import knapsack as k



class     A__     (						unittest.TestCase							):




	'''simple docstring'''





	def 							_SCREAMING_SNAKE_CASE     (  self:	Optional[int])       -> List[Any]:

				"""simple docstring"""

				__lowerCAmelCase   :						List[Any]				= 0
				__lowerCAmelCase   :						str				= [0]
				__lowerCAmelCase   :						Union[str, Any]				= [0]
				__lowerCAmelCase   :						List[Any]				= len(_SCREAMING_SNAKE_CASE)
				self.assertEqual(k.knapsack(_SCREAMING_SNAKE_CASE ,    _SCREAMING_SNAKE_CASE ,    _SCREAMING_SNAKE_CASE ,    _SCREAMING_SNAKE_CASE) ,    0)

				__lowerCAmelCase   :						Dict				= [60]
				__lowerCAmelCase   :						Optional[int]				= [10]
				__lowerCAmelCase   :						Tuple				= len(_SCREAMING_SNAKE_CASE)
				self.assertEqual(k.knapsack(_SCREAMING_SNAKE_CASE ,    _SCREAMING_SNAKE_CASE ,    _SCREAMING_SNAKE_CASE ,    _SCREAMING_SNAKE_CASE) ,    0)

	def 							_SCREAMING_SNAKE_CASE     (  self:	Any)       -> int:

				"""simple docstring"""

				__lowerCAmelCase   :						Dict				= 3
				__lowerCAmelCase   :						Dict				= [1, 2, 3]
				__lowerCAmelCase   :						str				= [3, 2, 1]
				__lowerCAmelCase   :						Optional[int]				= len(_SCREAMING_SNAKE_CASE)
				self.assertEqual(k.knapsack(_SCREAMING_SNAKE_CASE ,    _SCREAMING_SNAKE_CASE ,    _SCREAMING_SNAKE_CASE ,    _SCREAMING_SNAKE_CASE) ,    5)







	def 							_SCREAMING_SNAKE_CASE     (  self:	Optional[int])       -> Optional[Any]:

				"""simple docstring"""

				__lowerCAmelCase   :						List[str]				= 50
				__lowerCAmelCase   :						Dict				= [60, 100, 120]
				__lowerCAmelCase   :						List[Any]				= [10, 20, 30]
				__lowerCAmelCase   :						int				= len(_SCREAMING_SNAKE_CASE)
				self.assertEqual(k.knapsack(_SCREAMING_SNAKE_CASE ,    _SCREAMING_SNAKE_CASE ,    _SCREAMING_SNAKE_CASE ,    _SCREAMING_SNAKE_CASE) ,    220)


if __name__ == "__main__":
	unittest.main()