

"""simple docstring"""





_a       =							[
    [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],
]




def   _A  (  UpperCamelCase_     :       List[Any],			UpperCamelCase_     :       Optional[Any],			UpperCamelCase_     :       Tuple,			UpperCamelCase_     :       str)	->						Any:
   '''simple docstring'''


   __lowercase								=						[False] * len(UpperCamelCase_)
   __lowercase								=						[s]
   __lowercase								=						True

   while queue:
      __lowercase								=						queue.pop(0)
      for ind in range(len(graph[u])):
         if visited[ind] is False and graph[u][ind] > 0:
            queue.append(UpperCamelCase_)
            __lowercase								=						True
            __lowercase								=						u

   return visited[t]




def   _A  (  UpperCamelCase_     :       int,			UpperCamelCase_     :       Tuple,			UpperCamelCase_     :       List[str])	->						Optional[int]:
   '''simple docstring'''


   __lowercase								=						[-1] * (len(UpperCamelCase_))
   __lowercase								=						0
   __lowercase								=						[]
   __lowercase								=						[i[:] for i in graph]  # Record original cut, copy.
   while bfs(UpperCamelCase_,			UpperCamelCase_,			UpperCamelCase_,			UpperCamelCase_):
      __lowercase								=						float("Inf")
      __lowercase								=						sink

      while s != source:
         # Find the minimum value in select path
         __lowercase								=						min(UpperCamelCase_,			graph[parent[s]][s])
         __lowercase								=						parent[s]

      max_flow += path_flow
      __lowercase								=						sink

      while v != source:
         __lowercase								=						parent[v]
         graph[u][v] -= path_flow
         graph[v][u] += path_flow
         __lowercase								=						parent[v]

   for i in range(len(UpperCamelCase_)):
      for j in range(len(graph[0])):
         if graph[i][j] == 0 and temp[i][j] > 0:
            res.append((i, j))

   return res


if __name__ == "__main__":
   print(mincut(test_graph, source=0, sink=5))





"""simple docstring"""






from typing import TYPE_CHECKING

from ....utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


lowerCAmelCase__  :  str						     =	{
    'configuration_mctct': ['MCTCT_PRETRAINED_CONFIG_ARCHIVE_MAP', 'MCTCTConfig'],
    'feature_extraction_mctct': ['MCTCTFeatureExtractor'],
    'processing_mctct': ['MCTCTProcessor'],
}


try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						lowerCAmelCase__  :  Any						     =	[
						    'MCTCT_PRETRAINED_MODEL_ARCHIVE_LIST',
						    'MCTCTForCTC',
						    'MCTCTModel',
						    'MCTCTPreTrainedModel',
						]


if TYPE_CHECKING:
						from .configuration_mctct import MCTCT_PRETRAINED_CONFIG_ARCHIVE_MAP, MCTCTConfig
						from .feature_extraction_mctct import MCTCTFeatureExtractor
						from .processing_mctct import MCTCTProcessor

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_mctct import MCTCT_PRETRAINED_MODEL_ARCHIVE_LIST, MCTCTForCTC, MCTCTModel, MCTCTPreTrainedModel

else:
						import sys

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



