






'''simple docstring'''
import unittest

from knapsack import greedy_knapsack as kp






class      __SCREAMING_SNAKE_CASE      (			unittest.TestCase				):




 def      __magic_name__	(      self	:							int      )	->						Union[str, Any]:
       SCREAMING_SNAKE_CASE__     :				int									=[10, 20, 30, 40, 50, 60]
       SCREAMING_SNAKE_CASE__     :				int									=[2, 4, 6, 8, 10, 12]
       SCREAMING_SNAKE_CASE__     :				Tuple									=1_00
       self.assertEqual(kp.calc_profit(__lowercase					,      __lowercase					,      __lowercase      )					,      2_10      )




 def      __magic_name__	(      self	:							int      )	->						Any:
       self.assertRaisesRegex(__lowercase					,      '''max_weight must greater than zero.'''      )




 def      __magic_name__	(      self	:							Union[str, Any]      )	->						Dict:
       self.assertRaisesRegex(__lowercase					,      '''Weight can not be negative.'''      )




 def      __magic_name__	(      self	:							Dict      )	->						str:
       self.assertRaisesRegex(__lowercase					,      '''Profit can not be negative.'''      )




 def      __magic_name__	(      self	:							Optional[Any]      )	->						Any:
       self.assertRaisesRegex(__lowercase					,      '''max_weight must greater than zero.'''      )




 def      __magic_name__	(      self	:							int      )	->						List[str]:
       self.assertRaisesRegex(
           __lowercase					,      '''The length of profit and weight must be same.'''      )


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







'''simple docstring'''
def  _a(  UpperCamelCase__				:						str,	UpperCamelCase__				:						str							):




      '''simple docstring'''






      SCREAMING_SNAKE_CASE__     :				Optional[int]									=len(UpperCamelCase__							)
      SCREAMING_SNAKE_CASE__     :				Optional[Any]									=len(UpperCamelCase__							)
      SCREAMING_SNAKE_CASE__     :				Tuple									=[[False for _ in range(m + 1							)] for _ in range(n + 1							)]
      SCREAMING_SNAKE_CASE__     :				List[Any]									=True
      for i in range(UpperCamelCase__							):
            for j in range(m + 1							):
                  if dp[i][j]:
                        if j < m and a[i].upper() == b[j]:
                              SCREAMING_SNAKE_CASE__     :				Optional[int]									=True
                        if a[i].islower():
                              SCREAMING_SNAKE_CASE__     :				List[Any]									=True
      return dp[n][m]


if __name__ == "__main__":
  import doctest

  doctest.testmod()