

"""simple docstring"""





from __future__ import annotations



def     __lowercase					(    a :				list[float]       ,		a :				Optional[int] )					->					Optional[int]:
      print(f'''Vertex\tShortest Distance from vertex {src}''' )
      for i, d in enumerate(a ):
            print(f'''{i}\t\t{d}''' )



def     __lowercase					(    a :				list[dict[str, int]]       ,		a :				list[float]       ,		a :				int )					->					Optional[int]:
      for j in range(a ):
            __snake_case      :    List[Any]  			=(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     __lowercase					(    a :				list[dict[str, int]]       ,		a :				int       ,		a :				int       ,		a :				int )					->					list[float]:
      __snake_case      :    str  			=[float('''inf''' )] * vertex_count
      __snake_case      :    List[str]  			=0.0

      for _ in range(vertex_count - 1 ):
            for j in range(a ):
                  __snake_case      :    str  			=(graph[j][k] for k in ['''src''', '''dst''', '''weight'''])

                  if distance[u] != float('''inf''' ) and distance[u] + w < distance[v]:
                        __snake_case      :    Optional[Any]  			=distance[u] + w

      __snake_case      :    str  			=check_negative_cycle(a       ,		a       ,		a )
      if negative_cycle_exists:
            raise Exception('''Negative cycle found''' )

      return distance


if __name__ == "__main__":
    import doctest

    doctest.testmod()

    UpperCamelCase_	:				str										= int(input("""Enter number of vertices: """).strip())
    UpperCamelCase_	:				Tuple										= 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_	:				Optional[int]										= (
            int(x)
            for x in input("""Enter source, destination, weight: """).strip().split(""" """)
        )
        UpperCamelCase_	:				Optional[Any]										= {"""src""": src, """dst""": dest, """weight""": weight}

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










"""simple docstring"""





# this script reports modified .py files under the desired list of top-level sub-dirs passed as a list of arguments, e.g.:
#   python ./utils/get_modified_files.py utils src tests examples
#
# it uses git to find the forking point and which files were modified - i.e. files not under git won't be considered
# since the output of this script is fed into Makefile commands it doesn't print a newline after the results

import re
import subprocess
import sys


UpperCamelCase_	:				int										= subprocess.check_output("""git merge-base main HEAD""".split()).decode("""utf-8""")
UpperCamelCase_	:				Optional[int]										= (
    subprocess.check_output(F'''git diff --diff-filter=d --name-only {fork_point_sha}'''.split()).decode("""utf-8""").split()
)

UpperCamelCase_	:				List[Any]										= """|""".join(sys.argv[1:])
UpperCamelCase_	:				List[str]										= re.compile(rF'''^({joined_dirs}).*?\.py$''')

UpperCamelCase_	:				str										= [x for x in modified_files if regex.match(x)]
print(""" """.join(relevant_modified_files), end="""""")


