'''simple docstring'''




def _lowercase	(      lowerCamelCase__							,    lowerCamelCase__							,    lowerCamelCase__							,    lowerCamelCase__						)					->       Dict:





       """simple docstring"""


       __UpperCAmelCase  :				Any       				=		[False] * len(lowerCamelCase__						)
       __UpperCAmelCase  :				Tuple       				=		[]
       queue.append(lowerCamelCase__						)
       __UpperCAmelCase  :				int       				=		True

       while queue:
              __UpperCAmelCase  :				List[str]       				=		queue.pop(0						)
              for ind in range(len(graph[u]						)						):
                     if visited[ind] is False and graph[u][ind] > 0:
                            queue.append(lowerCamelCase__						)
                            __UpperCAmelCase  :				Tuple       				=		True
                            __UpperCAmelCase  :				int       				=		u

       return visited[t]

def _lowercase	(      lowerCamelCase__							,    lowerCamelCase__							,    lowerCamelCase__						)					->       int:





       """simple docstring"""


       __UpperCAmelCase  :				Tuple       				=		[-1] * (len(lowerCamelCase__						))
       __UpperCAmelCase  :				Any       				=		0
       while bfs(lowerCamelCase__							,    lowerCamelCase__							,    lowerCamelCase__							,    lowerCamelCase__						):
              __UpperCAmelCase  :				Tuple       				=		float("Inf"						)
              __UpperCAmelCase  :				Optional[int]       				=		sink

              while s != source:
                     # Find the minimum value in select path
                     __UpperCAmelCase  :				List[str]       				=		min(lowerCamelCase__							,    graph[parent[s]][s]						)
                     __UpperCAmelCase  :				str       				=		parent[s]

              max_flow += path_flow
              __UpperCAmelCase  :				List[str]       				=		sink

              while v != source:
                     __UpperCAmelCase  :				Optional[Any]       				=		parent[v]
                     graph[u][v] -= path_flow
                     graph[v][u] += path_flow
                     __UpperCAmelCase  :				Any       				=		parent[v]
       return max_flow


_a   :	Optional[Any] 							=   [
    [0, 16, 13, 0, 0, 0],
    [0, 0, 10, 12, 0, 0],
    [0, 4, 0, 0, 14, 0],
    [0, 0, 9, 0, 0, 20],
    [0, 0, 0, 7, 0, 4],
    [0, 0, 0, 0, 0, 0],
]

_a							,					_a   :	List[Any] 							=   0, 5


print(ford_fulkerson(graph, source, sink))







'''simple docstring'''




from typing import TYPE_CHECKING

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


_a   :	str 							=   {"configuration_vit": ["VIT_PRETRAINED_CONFIG_ARCHIVE_MAP", "ViTConfig", "ViTOnnxConfig"]}

try:
   if not is_vision_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   _a   :	str 							=   ["ViTFeatureExtractor"]
   _a   :	Dict 							=   ["ViTImageProcessor"]

try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   _a   :	int 							=   [
       "VIT_PRETRAINED_MODEL_ARCHIVE_LIST",
       "ViTForImageClassification",
       "ViTForMaskedImageModeling",
       "ViTModel",
       "ViTPreTrainedModel",
   ]

try:
   if not is_tf_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   _a   :	List[str] 							=   [
       "TFViTForImageClassification",
       "TFViTModel",
       "TFViTPreTrainedModel",
   ]

try:
   if not is_flax_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   _a   :	Dict 							=   [
       "FlaxViTForImageClassification",
       "FlaxViTModel",
       "FlaxViTPreTrainedModel",
   ]

if TYPE_CHECKING:
   from .configuration_vit import VIT_PRETRAINED_CONFIG_ARCHIVE_MAP, ViTConfig, ViTOnnxConfig

   try:
      if not is_vision_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .feature_extraction_vit import ViTFeatureExtractor
      from .image_processing_vit import ViTImageProcessor

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_vit import (
          VIT_PRETRAINED_MODEL_ARCHIVE_LIST,
          ViTForImageClassification,
          ViTForMaskedImageModeling,
          ViTModel,
          ViTPreTrainedModel,
      )

   try:
      if not is_tf_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_tf_vit import TFViTForImageClassification, TFViTModel, TFViTPreTrainedModel

   try:
      if not is_flax_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_flax_vit import FlaxViTForImageClassification, FlaxViTModel, FlaxViTPreTrainedModel


else:
   import sys

   _a   :	Dict 							=   _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)






