


def      _lowerCAmelCase  (							lowerCAmelCase_							:Union[str, Any]						,  lowerCAmelCase_							:str							)->Union[str, Any]:
   '''simple docstring'''






   print("\nVertex Distance"							)
   for i in range(lowerCAmelCase_							):
      if dist[i] != float("inf"							):
         print(lowerCAmelCase_						,  "\t"						,  int(dist[i]							)						,  end="\t"							)
      else:
         print(lowerCAmelCase_						,  "\t"						,  "INF"						,  end="\t"							)
      print()



def      _lowerCAmelCase  (							lowerCAmelCase_							:Optional[Any]						,  lowerCAmelCase_							:Union[str, Any]						,  lowerCAmelCase_							:Union[str, Any]							)->List[Any]:
   '''simple docstring'''






   snake_case_         =   float("inf"							)
   snake_case_         =   -1
   for i in range(lowerCAmelCase_							):
      if (not vset[i]) and mdist[i] < min_val:
         snake_case_         =   i
         snake_case_         =   mdist[i]
   return min_ind



def      _lowerCAmelCase  (							lowerCAmelCase_							:Tuple						,  lowerCAmelCase_							:Any						,  lowerCAmelCase_							:Dict							)->int:
   '''simple docstring'''






   snake_case_         =   [float("inf"							) for _ in range(lowerCAmelCase_							)]
   snake_case_         =   [False for _ in range(lowerCAmelCase_							)]
   snake_case_         =   0.0

   for _ in range(v - 1							):
      snake_case_         =   min_dist(lowerCAmelCase_						,  lowerCAmelCase_						,  lowerCAmelCase_							)
      snake_case_         =   True

      for i in range(lowerCAmelCase_							):
         if (
             (not vset[i])
             and graph[u][i] != float("inf"							)
             and mdist[u] + graph[u][i] < mdist[i]
         ):
            snake_case_         =   mdist[u] + graph[u][i]

   print_dist(lowerCAmelCase_						,  lowerCAmelCase_							)


if __name__ == "__main__":
   SCREAMING_SNAKE_CASE		:str											=       int(input('''Enter number of vertices: ''').strip())
   SCREAMING_SNAKE_CASE		:int											=       int(input('''Enter number of edges: ''').strip())

   SCREAMING_SNAKE_CASE		:Dict											=       [[float('''inf''') for i in range(V)] for j in range(V)]

   for i in range(V):
      SCREAMING_SNAKE_CASE		:int											=       0.0

   for i in range(E):
      print('''\nEdge ''', i + 1)
      SCREAMING_SNAKE_CASE		:Dict											=       int(input('''Enter source:''').strip())
      SCREAMING_SNAKE_CASE		:Optional[Any]											=       int(input('''Enter destination:''').strip())
      SCREAMING_SNAKE_CASE		:Any											=       float(input('''Enter weight:''').strip())
      SCREAMING_SNAKE_CASE		:Dict											=       weight

   SCREAMING_SNAKE_CASE		:str											=       int(input('''\nEnter shortest path source:''').strip())
   dijkstra(graph, V, gsrc)








from .prime_check import Test

Test()




