'''simple docstring'''
def  _UpperCamelCase (     _a	:	list[int]				,     _a	:	int			):




    """simple docstring"""



    __UpperCamelCase	:	Union[str, Any]		    =  len(_a			)
    __UpperCamelCase	:	int		    =  [[False] * (required_sum + 1) for _ in range(arr_len + 1			)]

    # for each arr value, a sum of zero(0) can be formed by not taking any element
    # hence True/1
    for i in range(arr_len + 1			):
        __UpperCamelCase	:	Dict		    =  True

    # sum is not zero and set is empty then false
    for i in range(1				,     required_sum + 1			):
        __UpperCamelCase	:	Optional[Any]		    =  False

    for i in range(1				,     arr_len + 1			):
        for j in range(1				,     required_sum + 1			):
            if arr[i - 1] > j:
                __UpperCamelCase	:	Dict		    =  subset[i - 1][j]
            if arr[i - 1] <= j:
                __UpperCamelCase	:	Union[str, Any]		    =  subset[i - 1][j] or subset[i - 1][j - arr[i - 1]]

    return subset[arr_len][required_sum]


if __name__ == "__main__":
  import doctest

  doctest.testmod()




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

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


a=  {'''configuration_vit_msn''': ['''VIT_MSN_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''ViTMSNConfig''']}

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  a=  [
      '''VIT_MSN_PRETRAINED_MODEL_ARCHIVE_LIST''',
      '''ViTMSNModel''',
      '''ViTMSNForImageClassification''',
      '''ViTMSNPreTrainedModel''',
  ]

if TYPE_CHECKING:
  from .configuration_vit_msn import VIT_MSN_PRETRAINED_CONFIG_ARCHIVE_MAP, ViTMSNConfig

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_vit_msn import (
        VIT_MSN_PRETRAINED_MODEL_ARCHIVE_LIST,
        ViTMSNForImageClassification,
        ViTMSNModel,
        ViTMSNPreTrainedModel,
    )

else:
  import sys

  a=  _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)



