




def 						lowerCamelCase__    (		_A     ,	_A							):







	'''simple docstring'''





	print("\nThe shortest path matrix using Floyd Warshall algorithm\n"							)
	for i in range(A__							):
		for j in range(A__							):
			if dist[i][j] != float("inf"							):
				print(int(dist[i][j]							)     ,	end="\t"							)
			else:
				print("INF"     ,	end="\t"							)
		print()


def 						lowerCamelCase__    (		_A     ,	_A							):







	'''simple docstring'''





	snake_case_		    =     [[float("inf"							) for _ in range(A__							)] for _ in range(A__							)]

	for i in range(A__							):
		for j in range(A__							):
			snake_case_		    =     graph[i][j]

			# check vertex k against all other vertices (i, j)
	for k in range(A__							):
		# looping through rows of graph array
		for i in range(A__							):
			# looping through columns of graph array
			for j in range(A__							):
				if (
				    dist[i][k] != float("inf"							)
				    and dist[k][j] != float("inf"							)
				    and dist[i][k] + dist[k][j] < dist[i][j]
				):
					snake_case_		    =     dist[i][k] + dist[k][j]

	_print_dist(A__     ,	A__							)
	return dist, v


if __name__ == "__main__":
		lowercase__				:     Any 		=						int(input("Enter number of vertices: "))
		lowercase__				:     Tuple 		=						int(input("Enter number of edges: "))

		lowercase__				:     Union[str, Any] 		=						[[float("inf") for i in range(v)] for j in range(v)]

		for i in range(v):
				lowercase__				:     Optional[Any] 		=						0.0

				# src and dst are indices that must be within the array size graph[e][v]
				# failure to follow this will result in an error
		for i in range(e):
				print("\nEdge ", i + 1)
				lowercase__				:     Union[str, Any] 		=						int(input("Enter source:"))
				lowercase__				:     Any 		=						int(input("Enter destination:"))
				lowercase__				:     Union[str, Any] 		=						float(input("Enter weight:"))
				lowercase__				:     Any 		=						weight

		floyd_warshall(graph, v)

		# Example Input
		# Enter number of vertices: 3
		# Enter number of edges: 2

		# # generated graph from vertex and edge inputs
		# [[inf, inf, inf], [inf, inf, inf], [inf, inf, inf]]
		# [[0.0, inf, inf], [inf, 0.0, inf], [inf, inf, 0.0]]

		# specify source, destination and weight for edge #1
		# Edge  1
		# Enter source:1
		# Enter destination:2
		# Enter weight:2

		# specify source, destination and weight for edge #2
		# Edge  2
		# Enter source:2
		# Enter destination:1
		# Enter weight:1

		# # Expected Output from the vertice, edge and src, dst, weight inputs!!
		# 0		INF	INF
		# INF	0	2
		# INF	1	0








"""simple docstring"""
def 				snake_case      (   A__	,A__						):
			# "extended trapezoidal rule"
			# int(f) = dx/2 * (f1 + 2f2 + ... + fn)
			UpperCAmelCase_     : Dict			     =					(boundary[1] - boundary[0]) / steps
			UpperCAmelCase_     : Optional[int]			     =					boundary[0]
			UpperCAmelCase_     : str			     =					boundary[1]
			UpperCAmelCase_     : Tuple			     =					make_points(A__	,A__	,A__						)
			UpperCAmelCase_     : List[str]			     =					0.0
			y += (h / 2.0) * f(A__						)
			for i in x_i:
						# print(i)
						y += h * f(A__						)
			y += (h / 2.0) * f(A__						)
			return y

def 				snake_case      (   A__	,A__	,A__						):
			UpperCAmelCase_     : Union[str, Any]			     =					a + h
			while x < (b - h):
						yield x
						UpperCAmelCase_     : Optional[Any]			     =					x + h

def 				snake_case      (   A__						):  # enter your function here
			UpperCAmelCase_     : Dict			     =					(x - 0) * (x - 0)
			return y

def 				snake_case      (   ):
			UpperCAmelCase_     : Dict			     =					0.0  # Lower bound of integration
			UpperCAmelCase_     : Optional[int]			     =					1.0  # Upper bound of integration
			UpperCAmelCase_     : Dict			     =					10.0  # define number of steps or resolution
			UpperCAmelCase_     : List[Any]			     =					[a, b]  # define boundary of integration
			UpperCAmelCase_     : Union[str, Any]			     =					method_a(A__	,A__						)
			print(F"""y = {y}"""						)


if __name__ == "__main__":
			main()



