



"""simple docstring"""





import unittest

from knapsack import knapsack as k
class  lowercase__  (       unittest.TestCase ):







       '''simple docstring'''


       def 	lowercase__							(				self     :    Optional[Any]       )					->		List[str]:


             '''simple docstring'''




             UpperCAmelCase_     					=				0
             UpperCAmelCase_     					=				[0]
             UpperCAmelCase_     					=				[0]
             UpperCAmelCase_     					=				len(_UpperCAmelCase       )
             self.assertEqual(k.knapsack(_UpperCAmelCase						,							_UpperCAmelCase						,							_UpperCAmelCase						,							_UpperCAmelCase       )						,							0       )

             UpperCAmelCase_     					=				[60]
             UpperCAmelCase_     					=				[10]
             UpperCAmelCase_     					=				len(_UpperCAmelCase       )
             self.assertEqual(k.knapsack(_UpperCAmelCase						,							_UpperCAmelCase						,							_UpperCAmelCase						,							_UpperCAmelCase       )						,							0       )



       def 	lowercase__							(				self     :    Dict       )					->		Dict:


             '''simple docstring'''




             UpperCAmelCase_     					=				3
             UpperCAmelCase_     					=				[1, 2, 3]
             UpperCAmelCase_     					=				[3, 2, 1]
             UpperCAmelCase_     					=				len(_UpperCAmelCase       )
             self.assertEqual(k.knapsack(_UpperCAmelCase						,							_UpperCAmelCase						,							_UpperCAmelCase						,							_UpperCAmelCase       )						,							5       )







       def 	lowercase__							(				self     :    int       )					->		Tuple:


             '''simple docstring'''




             UpperCAmelCase_     					=				50
             UpperCAmelCase_     					=				[60, 100, 120]
             UpperCAmelCase_     					=				[10, 20, 30]
             UpperCAmelCase_     					=				len(_UpperCAmelCase       )
             self.assertEqual(k.knapsack(_UpperCAmelCase						,							_UpperCAmelCase						,							_UpperCAmelCase						,							_UpperCAmelCase       )						,							220       )


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





'''simple docstring'''

from dataclasses import dataclass, field
from typing import ClassVar, Dict

from ..features import Features, Sequence, Value
from .base import TaskTemplate


@dataclass(frozen=lowerCAmelCase )
class 					_lowercase						(   lowerCAmelCase ):
      '''simple docstring'''


      UpperCAmelCase_   :   str   				= field(default='''question-answering-extractive'''		,metadata={'''include_in_asdict_even_if_is_default''': True} )
      UpperCAmelCase_   :   ClassVar[Features]   				= Features({'''question''': Value('''string''' ), '''context''': Value('''string''' )} )
      UpperCAmelCase_   :   ClassVar[Features]   				= Features(
          {
              '''answers''': Sequence(
                  {
                      '''text''': Value('''string''' ),
                      '''answer_start''': Value('''int32''' ),
                  } )
          } )
      UpperCAmelCase_   :   str   				= "question"
      UpperCAmelCase_   :   str   				= "context"
      UpperCAmelCase_   :   str   				= "answers"




      @property
      def 		lowerCAmelCase__       (					self				)      ->      Dict[str, str]:



         '''simple docstring'''



         return {self.question_column: "question", self.context_column: "context", self.answers_column: "answers"}




