


'''simple docstring'''






import unittest

from knapsack import greedy_knapsack as kp




class 	a       (       unittest.TestCase    ):
 def 							__UpperCAmelCase						(	self  )   ->							Dict:
      _a      =							[10, 20, 30, 40, 50, 60]
      _a      =							[2, 4, 6, 8, 10, 12]
      _a      =							1_00
      self.assertEqual(kp.calc_profit(__magic_name__ ,			__magic_name__ ,			__magic_name__  ) ,			2_10  )
 def 							__UpperCAmelCase						(	self  )   ->							Any:
      self.assertRaisesRegex(__magic_name__ ,			'max_weight must greater than zero.'  )
 def 							__UpperCAmelCase						(	self  )   ->							str:
      self.assertRaisesRegex(__magic_name__ ,			'Weight can not be negative.'  )
 def 							__UpperCAmelCase						(	self  )   ->							int:
      self.assertRaisesRegex(__magic_name__ ,			'Profit can not be negative.'  )
 def 							__UpperCAmelCase						(	self  )   ->							List[Any]:
      self.assertRaisesRegex(__magic_name__ ,			'max_weight must greater than zero.'  )




 def 							__UpperCAmelCase						(	self  )   ->							Dict:
      self.assertRaisesRegex(
          __magic_name__ ,			'The length of profit and weight must be same.'  )


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





'''simple docstring'''






def 		_A			(lowerCAmelCase__					:list[int]			,  lowerCAmelCase__					:list[int]						)				->					None:




     '''simple docstring'''



     _a      =							len(lowerCAmelCase__						)
     print('The following activities are selected:'						)

     # The first activity is always selected
     _a      =							0
     print(lowerCAmelCase__			,  end=','						)

     # Consider rest of the activities
     for j in range(lowerCAmelCase__						):
          # If this activity has start time greater than
          # or equal to the finish time of previously
          # selected activity, then select it
          if start[j] >= finish[i]:
               print(lowerCAmelCase__			,  end=','						)
               _a      =							j


if __name__ == "__main__":
 import doctest

 doctest.testmod()

 a_   :      List[str]				    =      [1, 3, 0, 5, 8, 5]
 a_   :      str				    =      [2, 4, 6, 7, 9, 9]
 print_max_activities(start, finish)

