
"""simple docstring"""




def 			_lowerCAmelCase		(		_UpperCamelCase			,					_UpperCamelCase			,					_UpperCamelCase			,					_UpperCamelCase    ):






  """simple docstring"""



  _lowercase:      Union[str, Any]   			=  [False] * len(_UpperCamelCase    )
  _lowercase:      Any   			=  []
  queue.append(_UpperCamelCase    )
  _lowercase:      Dict   			=  True

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

  return visited[t]




def 			_lowerCAmelCase		(		_UpperCamelCase			,					_UpperCamelCase			,					_UpperCamelCase    ):






  """simple docstring"""



  _lowercase:      Any   			=  [-1] * (len(_UpperCamelCase    ))
  _lowercase:      Optional[int]   			=  0
  while bfs(_UpperCamelCase			,					_UpperCamelCase			,					_UpperCamelCase			,					_UpperCamelCase    ):
    _lowercase:      str   			=  float('''Inf'''    )
    _lowercase:      Tuple   			=  sink

    while s != source:
      # Find the minimum value in select path
      _lowercase:      int   			=  min(_UpperCamelCase			,					graph[parent[s]][s]    )
      _lowercase:      Tuple   			=  parent[s]

    max_flow += path_flow
    _lowercase:      Dict   			=  sink

    while v != source:
      _lowercase:      Union[str, Any]   			=  parent[v]
      graph[u][v] -= path_flow
      graph[v][u] += path_flow
      _lowercase:      int   			=  parent[v]
  return max_flow


A__ :       List[Any]				= [
    [0, 1_6, 1_3, 0, 0, 0],
    [0, 0, 1_0, 1_2, 0, 0],
    [0, 4, 0, 0, 1_4, 0],
    [0, 0, 9, 0, 0, 2_0],
    [0, 0, 0, 7, 0, 4],
    [0, 0, 0, 0, 0, 0],
]

A__				,			A__ :       str				= 0, 5







print(ford_fulkerson(graph, source, sink))


"""simple docstring"""




from __future__ import annotations

import typing
from collections import Counter




def 			_lowerCAmelCase		(		_UpperCamelCase    ):






  """simple docstring"""



  _lowercase:      typing.Counter[int]   			=  Counter()
  for base in range(1			,					max_perimeter + 1    ):
    for perpendicular in range(_UpperCamelCase			,					max_perimeter + 1    ):
      _lowercase:      str   			=  (base * base + perpendicular * perpendicular) ** 0.5
      if hypotenuse == int(_UpperCamelCase    ):
        _lowercase:      str   			=  int(base + perpendicular + hypotenuse    )
        if perimeter > max_perimeter:
          continue
        triplets[perimeter] += 1
  return triplets




def 			_lowerCAmelCase		(		_UpperCamelCase = 1_000    ):






  """simple docstring"""



  _lowercase:      int   			=  pythagorean_triple(_UpperCamelCase    )
  return triplets.most_common(1    )[0][0]


if __name__ == "__main__":
  print(f"""Perimeter {solution()} has maximum solutions""")
