



"""simple docstring"""

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





def       __magic_name__    (   _lowerCamelCase				: List[str]  ,       _lowerCamelCase				: Union[str, Any]					):
       __a		:		Optional[int]									=       [[float("""inf"""					) for _ in range(_lowerCamelCase					)] for _ in range(_lowerCamelCase					)]

       for i in range(_lowerCamelCase					):
              for j in range(_lowerCamelCase					):
                     __a		:		Dict									=       graph[i][j]

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

       _print_dist(_lowerCamelCase  ,       _lowerCamelCase					)
       return dist, v


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

 lowercase__			   =  [[float("inf") for i in range(v)] for j in range(v)]

 for i in range(v):
  lowercase__			   =  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__			   =  int(input("Enter source:"))
  lowercase__			   =  int(input("Enter destination:"))
  lowercase__			   =  float(input("Enter weight:"))
  lowercase__			   =  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"""

import unittest

from knapsack import knapsack as k




class SCREAMING_SNAKE_CASE__					(		unittest.TestCase      ):



						def     lowerCAmelCase__(self							):





													'''simple docstring'''

													__a		:		str									=       0
													__a		:		Optional[Any]									=       [0]
													__a		:		int									=       [0]
													__a		:		str									=       len(_lowercase							)
													self.assertEqual(k.knapsack(_lowercase						,     _lowercase						,     _lowercase						,     _lowercase							)						,     0							)

													__a		:		int									=       [60]
													__a		:		Union[str, Any]									=       [10]
													__a		:		Tuple									=       len(_lowercase							)
													self.assertEqual(k.knapsack(_lowercase						,     _lowercase						,     _lowercase						,     _lowercase							)						,     0							)



						def     lowerCAmelCase__(self							):





													'''simple docstring'''

													__a		:		int									=       3
													__a		:		str									=       [1, 2, 3]
													__a		:		Optional[Any]									=       [3, 2, 1]
													__a		:		int									=       len(_lowercase							)
													self.assertEqual(k.knapsack(_lowercase						,     _lowercase						,     _lowercase						,     _lowercase							)						,     5							)





						def     lowerCAmelCase__(self							):





													'''simple docstring'''

													__a		:		Dict									=       50
													__a		:		Tuple									=       [60, 100, 120]
													__a		:		List[str]									=       [10, 20, 30]
													__a		:		Union[str, Any]									=       len(_lowercase							)
													self.assertEqual(k.knapsack(_lowercase						,     _lowercase						,     _lowercase						,     _lowercase							)						,     220							)


if __name__ == "__main__":
	unittest.main()

