
import requests
def    lowerCAmelCase_	(				SCREAMING_SNAKE_CASE_    ,      SCREAMING_SNAKE_CASE_						)     ->     None:




   """simple docstring"""
   _SCREAMING_SNAKE_CASE      =				{"""Content-Type""": """application/json"""}
   _SCREAMING_SNAKE_CASE      =				requests.post(SCREAMING_SNAKE_CASE_    ,      json={"""text""": message_body}    ,      headers=SCREAMING_SNAKE_CASE_						)
   if response.status_code != 2_00:
      _SCREAMING_SNAKE_CASE      =				(
          """Request to slack returned an error """
          F"{response.status_code}, the response is:\n{response.text}"
      )
      raise ValueError(SCREAMING_SNAKE_CASE_						)


if __name__ == "__main__":
     # Set the slack url to the one provided by Slack when you create the webhook at
     # https://my.slack.com/services/new/incoming-webhook/
     send_slack_message("<YOUR MESSAGE BODY>", "<SLACK CHANNEL URL>")








'''simple docstring'''



from __future__ import annotations
def    lowerCAmelCase_	(				SCREAMING_SNAKE_CASE_    ,      SCREAMING_SNAKE_CASE_						)     ->     Tuple:




   """simple docstring"""
   print(F"Vertex\tShortest Distance from vertex {src}"						)
   for i, d in enumerate(SCREAMING_SNAKE_CASE_						):
      print(F"{i}\t\t{d}"						)
def    lowerCAmelCase_	(				SCREAMING_SNAKE_CASE_    ,      SCREAMING_SNAKE_CASE_    ,      SCREAMING_SNAKE_CASE_						)     ->     List[Any]:




   """simple docstring"""
   for j in range(SCREAMING_SNAKE_CASE_						):
      _SCREAMING_SNAKE_CASE ,							_SCREAMING_SNAKE_CASE ,							_SCREAMING_SNAKE_CASE      =				(graph[j][k] for k in ["""src""", """dst""", """weight"""])
      if distance[u] != float("""inf"""						) and distance[u] + w < distance[v]:
         return True
   return False
def    lowerCAmelCase_	(				SCREAMING_SNAKE_CASE_    ,      SCREAMING_SNAKE_CASE_    ,      SCREAMING_SNAKE_CASE_    ,      SCREAMING_SNAKE_CASE_						)     ->     list[float]:




   """simple docstring"""
   _SCREAMING_SNAKE_CASE      =				[float("""inf"""						)] * vertex_count
   _SCREAMING_SNAKE_CASE      =				0.0

   for _ in range(vertex_count - 1						):
      for j in range(SCREAMING_SNAKE_CASE_						):
         _SCREAMING_SNAKE_CASE ,							_SCREAMING_SNAKE_CASE ,							_SCREAMING_SNAKE_CASE      =				(graph[j][k] for k in ["""src""", """dst""", """weight"""])

         if distance[u] != float("""inf"""						) and distance[u] + w < distance[v]:
            _SCREAMING_SNAKE_CASE      =				distance[u] + w

   _SCREAMING_SNAKE_CASE      =				check_negative_cycle(SCREAMING_SNAKE_CASE_    ,      SCREAMING_SNAKE_CASE_    ,      SCREAMING_SNAKE_CASE_						)
   if negative_cycle_exists:
      raise Exception("""Negative cycle found"""						)

   return distance


if __name__ == "__main__":
     import doctest

     doctest.testmod()

     UpperCamelCase__      :		int       							=  int(input("Enter number of vertices: ").strip())
     UpperCamelCase__      :		int       							=  int(input("Enter number of edges: ").strip())

     UpperCamelCase__      :		list[dict[str, int]]       							=  [{} for _ in range(E)]

     for i in range(E):
          print("Edge ", i + 1)
          UpperCamelCase__							,      UpperCamelCase__							,      UpperCamelCase__      :		Dict       							=  (
              int(x)
              for x in input("Enter source, destination, weight: ").strip().split(" ")
          )
          UpperCamelCase__      :		Optional[Any]       							=  {"src": src, "dst": dest, "weight": weight}

     UpperCamelCase__      :		Optional[Any]       							=  int(input("\nEnter shortest path source:").strip())
     UpperCamelCase__      :		Any       							=  bellman_ford(graph, V, E, source)
     print_distance(shortest_distance, 0)






