





_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 					SCREAMING_SNAKE_CASE__				(							UpperCamelCase__:				Any       , UpperCamelCase__:				Optional[Any]       , UpperCamelCase__:				str       , UpperCamelCase__:				Optional[Any]     ):
		# Return True if there is node that has not iterated.
		SCREAMING_SNAKE_CASE__								=   [False] * len(UpperCamelCase__     )
		SCREAMING_SNAKE_CASE__								=   [s]
		SCREAMING_SNAKE_CASE__								=   True

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

		return visited[t]






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

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

				max_flow += path_flow
				SCREAMING_SNAKE_CASE__								=   sink

				while v != source:
						SCREAMING_SNAKE_CASE__								=   parent[v]
						graph[u][v] -= path_flow
						graph[v][u] += path_flow
						SCREAMING_SNAKE_CASE__								=   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))






from torch import nn






def 					SCREAMING_SNAKE_CASE__				(							UpperCamelCase__:				str     ):
		if act_fn in ["swish", "silu"]:
				return nn.SiLU()
		elif act_fn == "mish":
				return nn.Mish()
		elif act_fn == "gelu":
				return nn.GELU()
		else:
				raise ValueError(f'''Unsupported activation function: {act_fn}'''     )