
from __future__ import annotations


def 				__A(lowerCAmelCase    ,	lowerCAmelCase			)		->					Optional[int]:

		"""simple docstring"""






		_UpperCamelCase         =						[]
		create_all_state(1    ,	_a    ,	_a    ,	[]    ,	_a			)
		return result


def 				__A(lowerCAmelCase    ,	lowerCAmelCase    ,	lowerCAmelCase    ,	lowerCAmelCase    ,	lowerCAmelCase    ,	)		->					List[Any]:

		"""simple docstring"""






		if level == 0:
				total_list.append(current_list[:]			)
				return

		for i in range(_a    ,	total_number - level + 2			):
				current_list.append(_a			)
				create_all_state(i + 1    ,	_a    ,	level - 1    ,	_a    ,	_a			)
				current_list.pop()


def 				__A(lowerCAmelCase			)		->					Optional[Any]:

		"""simple docstring"""






		for i in total_list:
				print(*_a			)


if __name__ == "__main__":
		lowerCamelCase__						=				4
		lowerCamelCase__						=				2
		lowerCamelCase__						=				generate_all_combinations(n, k)
		print_all_state(total_list)






"""simple docstring"""


import unittest

from knapsack import greedy_knapsack as kp





class lowerCamelCase__   (				unittest.TestCase    ):



    '''simple docstring'''




    def UpperCamelCase__		( self    )    ->      Any:
          A				  =		[1_0, 2_0, 3_0, 4_0, 5_0, 6_0]
          A				  =		[2, 4, 6, 8, 1_0, 1_2]
          A				  =		1_0_0
          self.assertEqual(kp.calc_profit(lowerCamelCase_ ,lowerCamelCase_ ,lowerCamelCase_    ) ,2_1_0    )




    def UpperCamelCase__		( self    )    ->      List[Any]:
          self.assertRaisesRegex(lowerCamelCase_ ,"""max_weight must greater than zero."""    )




    def UpperCamelCase__		( self    )    ->      Any:
          self.assertRaisesRegex(lowerCamelCase_ ,"""Weight can not be negative."""    )




    def UpperCamelCase__		( self    )    ->      str:
          self.assertRaisesRegex(lowerCamelCase_ ,"""Profit can not be negative."""    )




    def UpperCamelCase__		( self    )    ->      Optional[int]:
          self.assertRaisesRegex(lowerCamelCase_ ,"""max_weight must greater than zero."""    )




    def UpperCamelCase__		( self    )    ->      str:
          self.assertRaisesRegex(
              lowerCamelCase_ ,"""The length of profit and weight must be same."""    )


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




