


"""simple docstring"""




import math
class 					__lowerCAmelCase					:


		'''simple docstring'''



		def __init__(  self							, _a=0      ):  # a graph with Node 0,1,...,N-1
				__a           =			n
				__a           =			[
				    [math.inf for j in range(0							, __UpperCamelCase      )] for i in range(0							, __UpperCamelCase      )
				]  # adjacency matrix for weight
				__a           =			[
				    [math.inf for j in range(0							, __UpperCamelCase      )] for i in range(0							, __UpperCamelCase      )
				]  # dp[i][j] stores minimum distance from i to j

		def 			__UpperCAmelCase       (  self							, _a							, _a							, _a      ):
				__a           =			w

		def 			__UpperCAmelCase       (  self      ):


				for k in range(0							, self.n      ):
						for i in range(0							, self.n      ):
								for j in range(0							, self.n      ):
										__a           =			min(self.dp[i][j]							, self.dp[i][k] + self.dp[k][j]      )





		def 			__UpperCAmelCase       (  self							, _a							, _a      ):
				return self.dp[u][v]


if __name__ == "__main__":
				lowercase_			     =  Graph(5)
				graph.add_edge(0, 2, 9)
				graph.add_edge(0, 4, 1_0)
				graph.add_edge(1, 3, 5)
				graph.add_edge(2, 3, 7)
				graph.add_edge(3, 0, 1_0)
				graph.add_edge(3, 1, 2)
				graph.add_edge(3, 2, 1)
				graph.add_edge(3, 4, 6)
				graph.add_edge(4, 1, 3)
				graph.add_edge(4, 2, 4)
				graph.add_edge(4, 3, 9)
				graph.floyd_warshall()
				graph.show_min(1, 4)
				graph.show_min(0, 3)







"""simple docstring"""







from __future__ import annotations



def 			lowercase__(       __SCREAMING_SNAKE_CASE							:     list      ):
     if not nums:
          raise ValueError('List is empty'      )
     return sum(__SCREAMING_SNAKE_CASE      ) / len(__SCREAMING_SNAKE_CASE      )


if __name__ == "__main__":
       import doctest

       doctest.testmod()

