
'''simple docstring'''





def snake_case_    (				lowercase__		):
  UpperCAmelCase__			:				List[str]												=       len(lowercase__		)
  UpperCAmelCase__			:				Dict												=       [0] * length
  UpperCAmelCase__			:				Tuple												=       [[False for i in range(lowercase__		)] for j in range(lowercase__		)]
  for i, c in enumerate(lowercase__		):
    UpperCAmelCase__			:				Dict												=       i
    for j in range(i + 1		):
      if c == string[j] and (i - j < 2 or is_palindromic[j + 1][i - 1]):
        UpperCAmelCase__			:				Dict												=       True
        UpperCAmelCase__			:				Any												=       min(lowercase__      ,					0 if j == 0 else (cut[j - 1] + 1)		)
    UpperCAmelCase__			:				List[Any]												=       mincut
  return cut[length - 1]


if __name__ == "__main__":
      SCREAMING_SNAKE_CASE    =					input("""Enter the string: """).strip()
      SCREAMING_SNAKE_CASE    =					find_minimum_partitions(s)
      print(F'Minimum number of partitions required for the \'{s}\' is {ans}')





'''simple docstring'''





from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


SCREAMING_SNAKE_CASE    =					{"""configuration_visual_bert""": ["""VISUAL_BERT_PRETRAINED_CONFIG_ARCHIVE_MAP""", """VisualBertConfig"""]}

try:
      if not is_torch_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      SCREAMING_SNAKE_CASE    =					[
          """VISUAL_BERT_PRETRAINED_MODEL_ARCHIVE_LIST""",
          """VisualBertForMultipleChoice""",
          """VisualBertForPreTraining""",
          """VisualBertForQuestionAnswering""",
          """VisualBertForRegionToPhraseAlignment""",
          """VisualBertForVisualReasoning""",
          """VisualBertLayer""",
          """VisualBertModel""",
          """VisualBertPreTrainedModel""",
      ]


if TYPE_CHECKING:
      from .configuration_visual_bert import VISUAL_BERT_PRETRAINED_CONFIG_ARCHIVE_MAP, VisualBertConfig

      try:
            if not is_torch_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_visual_bert import (
                VISUAL_BERT_PRETRAINED_MODEL_ARCHIVE_LIST,
                VisualBertForMultipleChoice,
                VisualBertForPreTraining,
                VisualBertForQuestionAnswering,
                VisualBertForRegionToPhraseAlignment,
                VisualBertForVisualReasoning,
                VisualBertLayer,
                VisualBertModel,
                VisualBertPreTrainedModel,
            )


else:
      import sys

      SCREAMING_SNAKE_CASE    =					_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)



