
def       UpperCAmelCase_					(  __lowerCAmelCase		,   __lowerCAmelCase		)	->  Optional[int]:
    print('''\nVertex Distance'''		)
    for i in range(_A		):
        if dist[i] != float('''inf'''		):
            print(_A		,   '''\t'''		,   int(dist[i]		)		,   end='''\t'''		)
        else:
            print(_A		,   '''\t'''		,   '''INF'''		,   end='''\t'''		)
        print()


def       UpperCAmelCase_					(  __lowerCAmelCase		,   __lowerCAmelCase		,   __lowerCAmelCase		)	->  List[Any]:
    __lowercase						:     List[Any]		      =    float('''inf'''		)
    __lowercase						:     Optional[Any]		      =    -1
    for i in range(_A		):
        if (not vset[i]) and mdist[i] < min_val:
            __lowercase						:     List[str]		      =    i
            __lowercase						:     Union[str, Any]		      =    mdist[i]
    return min_ind


def       UpperCAmelCase_					(  __lowerCAmelCase		,   __lowerCAmelCase		,   __lowerCAmelCase		)	->  Any:
    __lowercase						:     Optional[Any]		      =    [float('''inf'''		) for _ in range(_A		)]
    __lowercase						:     int		      =    [False for _ in range(_A		)]
    __lowercase						:     Optional[Any]		      =    0.0

    for _ in range(v - 1		):
        __lowercase						:     List[str]		      =    min_dist(_A		,   _A		,   _A		)
        __lowercase						:     Union[str, Any]		      =    True

        for i in range(_A		):
            if (
                (not vset[i])
                and graph[u][i] != float('''inf'''		)
                and mdist[u] + graph[u][i] < mdist[i]
            ):
                __lowercase						:     Optional[int]		      =    mdist[u] + graph[u][i]

    print_dist(_A		,   _A		)


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

 __lowerCAmelCase      =						[[float("inf") for i in range(V)] for j in range(V)]

 for i in range(V):
  __lowerCAmelCase      =						0.0

 for i in range(E):
  print("\nEdge ", i + 1)
  __lowerCAmelCase      =						int(input("Enter source:").strip())
  __lowerCAmelCase      =						int(input("Enter destination:").strip())
  __lowerCAmelCase      =						float(input("Enter weight:").strip())
  __lowerCAmelCase      =						weight

 __lowerCAmelCase      =						int(input("\nEnter shortest path source:").strip())
 dijkstra(graph, V, gsrc)




import importlib.metadata
import sys

from transformers.testing_utils import TestCasePlus
from transformers.utils.versions import require_version, require_version_core


__lowerCAmelCase   :     Optional[Any]      =						importlib.metadata.version("numpy")
__lowerCAmelCase   :     Any      =						".".join([str(x) for x in sys.version_info[:3]])


class   __lowerCAmelCase		(		lowerCAmelCase_ ):



      """simple docstring"""







      def 						snake_case_     ( self						:    List[Any]			):
          # lt + different version strings
          require_version_core('''numpy<1000.4.5'''			)
          require_version_core('''numpy<1000.4'''			)
          require_version_core('''numpy<1000'''			)

          # le
          require_version_core('''numpy<=1000.4.5'''			)
          require_version_core(F'numpy<={numpy_ver}'			)

          # eq
          require_version_core(F'numpy=={numpy_ver}'			)

          # ne
          require_version_core('''numpy!=1000.4.5'''			)

          # ge
          require_version_core('''numpy>=1.0'''			)
          require_version_core('''numpy>=1.0.0'''			)
          require_version_core(F'numpy>={numpy_ver}'			)

          # gt
          require_version_core('''numpy>1.0.0'''			)

          # mix
          require_version_core('''numpy>1.0.0,<1000'''			)

          # requirement w/o version
          require_version_core('''numpy'''			)

          # unmet requirements due to version conflict
          for req in ["numpy==1.0.0", "numpy>=1000.0.0", F'numpy<{numpy_ver}']:
              try:
                  require_version_core(_snake_case			)
              except ImportError as e:
                  self.assertIn(F'{req} is required'			,    str(_snake_case			)			)
                  self.assertIn('''but found'''			,    str(_snake_case			)			)

        # unmet requirements due to missing module
          for req in ["numpipypie>1", "numpipypie2"]:
              try:
                  require_version_core(_snake_case			)
              except importlib.metadata.PackageNotFoundError as e:
                  self.assertIn(F'The \'{req}\' distribution was not found and is required by this application'			,    str(_snake_case			)			)
                  self.assertIn('''Try: pip install transformers -U'''			,    str(_snake_case			)			)

        # bogus requirements formats:
        # 1. whole thing
          for req in ["numpy??1.0.0", "numpy1.0.0"]:
              try:
                  require_version_core(_snake_case			)
              except ValueError as e:
                  self.assertIn('''requirement needs to be in the pip package format'''			,    str(_snake_case			)			)
        # 2. only operators
          for req in ["numpy=1.0.0", "numpy == 1.00", "numpy<>1.0.0", "numpy><1.00", "numpy>>1.0.0"]:
              try:
                  require_version_core(_snake_case			)
              except ValueError as e:
                  self.assertIn('''need one of '''			,    str(_snake_case			)			)




      def 						snake_case_     ( self						:    List[str]			):
          # matching requirement
          require_version('''python>=3.6.0'''			)

          # not matching requirements
          for req in ["python>9.9.9", "python<3.0.0"]:
              try:
                  require_version_core(_snake_case			)
              except ImportError as e:
                  self.assertIn(F'{req} is required'			,    str(_snake_case			)			)
                  self.assertIn(F'but found python=={python_ver}'			,    str(_snake_case			)			)


