





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



def      UpperCAmelCase_   (     __UpperCamelCase,    __UpperCamelCase,    __UpperCamelCase     ):
    SCREAMING_SNAKE_CASE__       =float("""inf"""     )
    SCREAMING_SNAKE_CASE__       =-1
    for i in range(__UpperCamelCase     ):
        if (not vset[i]) and mdist[i] < min_val:
            SCREAMING_SNAKE_CASE__       =i
            SCREAMING_SNAKE_CASE__       =mdist[i]
    return min_ind



def      UpperCAmelCase_   (     __UpperCamelCase,    __UpperCamelCase,    __UpperCamelCase     ):
    SCREAMING_SNAKE_CASE__       =[float("""inf"""     ) for _ in range(__UpperCamelCase     )]
    SCREAMING_SNAKE_CASE__       =[False for _ in range(__UpperCamelCase     )]
    SCREAMING_SNAKE_CASE__       =0.0

    for _ in range(v - 1     ):
        SCREAMING_SNAKE_CASE__       =min_dist(__UpperCamelCase,    __UpperCamelCase,    __UpperCamelCase     )
        SCREAMING_SNAKE_CASE__       =True

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

    print_dist(__UpperCamelCase,    __UpperCamelCase     )


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)












from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_flax_available,
    is_sentencepiece_available,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
)


lowerCamelCase_  						=       {
    "configuration_marian": ["MARIAN_PRETRAINED_CONFIG_ARCHIVE_MAP", "MarianConfig", "MarianOnnxConfig"],
}

try:
    if not is_sentencepiece_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    lowerCamelCase_  						=       ["MarianTokenizer"]

try:
    if not is_torch_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    lowerCamelCase_  						=       [
        "MARIAN_PRETRAINED_MODEL_ARCHIVE_LIST",
        "MarianForCausalLM",
        "MarianModel",
        "MarianMTModel",
        "MarianPreTrainedModel",
    ]

try:
    if not is_tf_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    lowerCamelCase_  						=       ["TFMarianModel", "TFMarianMTModel", "TFMarianPreTrainedModel"]

try:
    if not is_flax_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    lowerCamelCase_  						=       ["FlaxMarianModel", "FlaxMarianMTModel", "FlaxMarianPreTrainedModel"]

if TYPE_CHECKING:
    from .configuration_marian import MARIAN_PRETRAINED_CONFIG_ARCHIVE_MAP, MarianConfig, MarianOnnxConfig

    try:
        if not is_sentencepiece_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .tokenization_marian import MarianTokenizer

    try:
        if not is_torch_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_marian import (
            MARIAN_PRETRAINED_MODEL_ARCHIVE_LIST,
            MarianForCausalLM,
            MarianModel,
            MarianMTModel,
            MarianPreTrainedModel,
        )

    try:
        if not is_tf_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_tf_marian import TFMarianModel, TFMarianMTModel, TFMarianPreTrainedModel

    try:
        if not is_flax_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_flax_marian import FlaxMarianModel, FlaxMarianMTModel, FlaxMarianPreTrainedModel

else:
    import sys

    lowerCamelCase_  						=       _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)






