





import math





class 			lowerCAmelCase__:






       '''simple docstring'''


       def __init__(      self    ,						__lowerCamelCase=0							)			->     Tuple:  # a graph with Node 0,1,...,N-1
            _SCREAMING_SNAKE_CASE       :	Tuple						    =							n
            _SCREAMING_SNAKE_CASE       :	Union[str, Any]						    =							[
                [math.inf for j in range(0    ,						__lowerCamelCase							)] for i in range(0    ,						__lowerCamelCase							)
            ]  # adjacency matrix for weight
            _SCREAMING_SNAKE_CASE       :	str						    =							[
                [math.inf for j in range(0    ,						__lowerCamelCase							)] for i in range(0    ,						__lowerCamelCase							)
            ]  # dp[i][j] stores minimum distance from i to j




       def     UpperCamelCase_			(      self    ,						__lowerCamelCase    ,						__lowerCamelCase    ,						__lowerCamelCase							)			->     Optional[int]:
            _SCREAMING_SNAKE_CASE       :	Any						    =							w




       def     UpperCamelCase_			(      self							)			->     Optional[int]:
            for k in range(0    ,						self.n							):
                 for i in range(0    ,						self.n							):
                      for j in range(0    ,						self.n							):
                           _SCREAMING_SNAKE_CASE       :	Optional[Any]						    =							min(self.dp[i][j]    ,						self.dp[i][k] + self.dp[k][j]							)







       def     UpperCamelCase_			(      self    ,						__lowerCamelCase    ,						__lowerCamelCase							)			->     Optional[int]:
            return self.dp[u][v]


if __name__ == "__main__":
       UpperCamelCase__      =Graph(5)
       graph.add_edge(0, 2, 9)
       graph.add_edge(0, 4, 10)
       graph.add_edge(1, 3, 5)
       graph.add_edge(2, 3, 7)
       graph.add_edge(3, 0, 10)
       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)






import cmath
import math






def     lowerCamelCase__			(__lowerCamelCase,       __lowerCamelCase,       __lowerCamelCase,       __lowerCamelCase	):
     _SCREAMING_SNAKE_CASE       :	Any						    =							math.radians(__lowerCamelCase	)
     _SCREAMING_SNAKE_CASE       :	Tuple						    =							math.radians(__lowerCamelCase	)

     # Convert voltage and current to rectangular form
     _SCREAMING_SNAKE_CASE       :	str						    =							cmath.rect(__lowerCamelCase,       __lowerCamelCase	)
     _SCREAMING_SNAKE_CASE       :	str						    =							cmath.rect(__lowerCamelCase,       __lowerCamelCase	)

     # Calculate apparent power
     return voltage_rect * current_rect


if __name__ == "__main__":
       import doctest

       doctest.testmod()