





_lowerCAmelCase 				=     [
    [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     _lowerCAmelCase		(  _lowerCAmelCase  ,_lowerCAmelCase  ,_lowerCAmelCase  ,_lowerCAmelCase     ):
   '''simple docstring'''


   A_     :				Tuple			      =	[False] * len(_lowerCAmelCase     )
   A_     :				Optional[int]			      =	[s]
   A_     :				str			      =	True

   while queue:
      A_     :				Union[str, Any]			      =	queue.pop(0     )
      for ind in range(len(graph[u]     )     ):
         if visited[ind] is False and graph[u][ind] > 0:
            queue.append(_lowerCAmelCase     )
            A_     :				Optional[int]			      =	True
            A_     :				Tuple			      =	u

   return visited[t]



def     _lowerCAmelCase		(  _lowerCAmelCase  ,_lowerCAmelCase  ,_lowerCAmelCase     ):
   '''simple docstring'''


   A_     :				Optional[Any]			      =	[-1] * (len(_lowerCAmelCase     ))
   A_     :				List[str]			      =	0
   A_     :				Union[str, Any]			      =	[]
   A_     :				str			      =	[i[:] for i in graph]  # Record original cut, copy.
   while bfs(_lowerCAmelCase  ,_lowerCAmelCase  ,_lowerCAmelCase  ,_lowerCAmelCase     ):
      A_     :				Optional[Any]			      =	float("""Inf"""     )
      A_     :				Dict			      =	sink

      while s != source:
         # Find the minimum value in select path
         A_     :				str			      =	min(_lowerCAmelCase  ,graph[parent[s]][s]     )
         A_     :				Optional[Any]			      =	parent[s]

      max_flow += path_flow
      A_     :				Dict			      =	sink

      while v != source:
         A_     :				Dict			      =	parent[v]
         graph[u][v] -= path_flow
         graph[v][u] += path_flow
         A_     :				Optional[int]			      =	parent[v]

   for i in range(len(_lowerCAmelCase     )     ):
      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))













# coding=utf-8
# Copyright 2020 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# this script dumps information about the environment

import os
import sys

import transformers


_lowerCAmelCase 				=     """3"""

print("""Python version:""", sys.version)
print("""transformers version:""", transformers.__version__)

try:
      import torch

      print("""Torch version:""", torch.__version__)
      print("""Cuda available:""", torch.cuda.is_available())
      print("""Cuda version:""", torch.version.cuda)
      print("""CuDNN version:""", torch.backends.cudnn.version())
      print("""Number of GPUs available:""", torch.cuda.device_count())
      print("""NCCL version:""", torch.cuda.nccl.version())
except ImportError:
      print("""Torch version:""", None)

try:
      import deepspeed

      print("""DeepSpeed version:""", deepspeed.__version__)
except ImportError:
      print("""DeepSpeed version:""", None)

try:
      import tensorflow as tf

      print("""TensorFlow version:""", tf.__version__)
      print("""TF GPUs available:""", bool(tf.config.list_physical_devices("""GPU""")))
      print("""Number of TF GPUs available:""", len(tf.config.list_physical_devices("""GPU""")))
except ImportError:
      print("""TensorFlow version:""", None)






