




'''simple docstring'''


def 		_lowerCAmelCase							(   lowercase							: int					,  lowercase							: list[int]					,  lowercase							: int    )			->List[Any]:
   """simple docstring"""




   def count_of_possible_combinations(lowercase							: int    ) -> int:
      if target < 0:
         return 0
      if target == 0:
         return 1
      return sum(count_of_possible_combinations(target - item    ) for item in array    )

   return count_of_possible_combinations(UpperCamelCase__    )






def 		_lowerCAmelCase							(   lowercase							: int					,  lowercase							: list[int]					,  lowercase							: int    )			->List[Any]:
   """simple docstring"""




   def count_of_possible_combinations_with_dp_array(
       lowercase							: int					,  lowercase							: list[int]    ) -> int:
      if target < 0:
         return 0
      if target == 0:
         return 1
      if dp_array[target] != -1:
         return dp_array[target]
      lowercase__       							=							sum(
          count_of_possible_combinations_with_dp_array(target - item					,  UpperCamelCase__    )
          for item in array    )
      lowercase__       							=							answer
      return answer

   lowercase__       							=							[-1] * (target + 1)
   return count_of_possible_combinations_with_dp_array(UpperCamelCase__					,  UpperCamelCase__    )






def 		_lowerCAmelCase							(   lowercase							: int					,  lowercase							: list[int]					,  lowercase							: int    )			->Any:
   """simple docstring"""




   lowercase__       							=							[0] * (target + 1)
   lowercase__       							=							1

   for i in range(1					,  target + 1    ):
      for j in range(UpperCamelCase__    ):
         if i - array[j] >= 0:
            dp_array[i] += dp_array[i - array[j]]

   return dp_array[target]


if __name__ == "__main__":
  import doctest

  doctest.testmod()
  _lowerCAmelCase  		=      3
  _lowerCAmelCase  		=      5
  _lowerCAmelCase  		=      [1, 2, 5]
  print(combination_sum_iv(n, array, target))








'''simple docstring'''
from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_flax_available,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
)


UpperCAmelCase_			:  Dict										=   {
    'configuration_distilbert': [
        'DISTILBERT_PRETRAINED_CONFIG_ARCHIVE_MAP',
        'DistilBertConfig',
        'DistilBertOnnxConfig',
    ],
    'tokenization_distilbert': ['DistilBertTokenizer'],
}

try:
 if not is_tokenizers_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 UpperCAmelCase_			:  List[Any]										=   ['DistilBertTokenizerFast']

try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 UpperCAmelCase_			:  int										=   [
     'DISTILBERT_PRETRAINED_MODEL_ARCHIVE_LIST',
     'DistilBertForMaskedLM',
     'DistilBertForMultipleChoice',
     'DistilBertForQuestionAnswering',
     'DistilBertForSequenceClassification',
     'DistilBertForTokenClassification',
     'DistilBertModel',
     'DistilBertPreTrainedModel',
 ]

try:
 if not is_tf_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 UpperCAmelCase_			:  Optional[int]										=   [
     'TF_DISTILBERT_PRETRAINED_MODEL_ARCHIVE_LIST',
     'TFDistilBertForMaskedLM',
     'TFDistilBertForMultipleChoice',
     'TFDistilBertForQuestionAnswering',
     'TFDistilBertForSequenceClassification',
     'TFDistilBertForTokenClassification',
     'TFDistilBertMainLayer',
     'TFDistilBertModel',
     'TFDistilBertPreTrainedModel',
 ]

try:
 if not is_flax_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 UpperCAmelCase_			:  List[str]										=   [
     'FlaxDistilBertForMaskedLM',
     'FlaxDistilBertForMultipleChoice',
     'FlaxDistilBertForQuestionAnswering',
     'FlaxDistilBertForSequenceClassification',
     'FlaxDistilBertForTokenClassification',
     'FlaxDistilBertModel',
     'FlaxDistilBertPreTrainedModel',
 ]


if TYPE_CHECKING:
 from .configuration_distilbert import (
     DISTILBERT_PRETRAINED_CONFIG_ARCHIVE_MAP,
     DistilBertConfig,
     DistilBertOnnxConfig,
 )
 from .tokenization_distilbert import DistilBertTokenizer

 try:
  if not is_tokenizers_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .tokenization_distilbert_fast import DistilBertTokenizerFast

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_distilbert import (
      DISTILBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
      DistilBertForMaskedLM,
      DistilBertForMultipleChoice,
      DistilBertForQuestionAnswering,
      DistilBertForSequenceClassification,
      DistilBertForTokenClassification,
      DistilBertModel,
      DistilBertPreTrainedModel,
  )

 try:
  if not is_tf_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_tf_distilbert import (
      TF_DISTILBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
      TFDistilBertForMaskedLM,
      TFDistilBertForMultipleChoice,
      TFDistilBertForQuestionAnswering,
      TFDistilBertForSequenceClassification,
      TFDistilBertForTokenClassification,
      TFDistilBertMainLayer,
      TFDistilBertModel,
      TFDistilBertPreTrainedModel,
  )

 try:
  if not is_flax_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_flax_distilbert import (
      FlaxDistilBertForMaskedLM,
      FlaxDistilBertForMultipleChoice,
      FlaxDistilBertForQuestionAnswering,
      FlaxDistilBertForSequenceClassification,
      FlaxDistilBertForTokenClassification,
      FlaxDistilBertModel,
      FlaxDistilBertPreTrainedModel,
  )

else:
 import sys

 UpperCAmelCase_			:  Optional[Any]										=   _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)






