
'''simple docstring'''



from ...configuration_utils import PretrainedConfig
from ...utils import logging


UpperCamelCase__ :						Optional[Any]    							=					logging.get_logger(__name__)

UpperCamelCase__ :						Tuple    							=					{
    "microsoft/mpnet-base": "https://huggingface.co/microsoft/mpnet-base/resolve/main/config.json",
}

class 				_a			(snake_case__):





       """simple docstring"""




       SCREAMING_SNAKE_CASE =					'mpnet'






       def __init__(							self    ,							A__=3_05_27    ,							A__=7_68    ,							A__=12    ,							A__=12    ,							A__=30_72    ,							A__="gelu"    ,							A__=0.1    ,							A__=0.1    ,							A__=5_12    ,							A__=0.02    ,							A__=1E-12    ,							A__=32    ,							A__=1    ,							A__=0    ,							A__=2    ,							**A__    ,							)      ->     Optional[Any]:
          super().__init__(pad_token_id=A__    ,							bos_token_id=A__    ,							eos_token_id=A__    ,							**A__ )

          _SCREAMING_SNAKE_CASE       	=			vocab_size
          _SCREAMING_SNAKE_CASE       	=			hidden_size
          _SCREAMING_SNAKE_CASE       	=			num_hidden_layers
          _SCREAMING_SNAKE_CASE       	=			num_attention_heads
          _SCREAMING_SNAKE_CASE       	=			hidden_act
          _SCREAMING_SNAKE_CASE       	=			intermediate_size
          _SCREAMING_SNAKE_CASE       	=			hidden_dropout_prob
          _SCREAMING_SNAKE_CASE       	=			attention_probs_dropout_prob
          _SCREAMING_SNAKE_CASE       	=			max_position_embeddings
          _SCREAMING_SNAKE_CASE       	=			initializer_range
          _SCREAMING_SNAKE_CASE       	=			layer_norm_eps
          _SCREAMING_SNAKE_CASE       	=			relative_attention_num_buckets








'''simple docstring'''



def 				lowerCAmelCase_		(			SCREAMING_SNAKE_CASE_      , SCREAMING_SNAKE_CASE_  )       ->       Optional[int]:




   """simple docstring"""
   print("""\nVertex Distance"""  )
   for i in range(SCREAMING_SNAKE_CASE_  ):
      if dist[i] != float("""inf"""  ):
         print(SCREAMING_SNAKE_CASE_      , """\t"""      , int(dist[i]  )      , end="""\t"""  )
      else:
         print(SCREAMING_SNAKE_CASE_      , """\t"""      , """INF"""      , end="""\t"""  )
      print()
def 				lowerCAmelCase_		(			SCREAMING_SNAKE_CASE_      , SCREAMING_SNAKE_CASE_      , SCREAMING_SNAKE_CASE_  )       ->       Optional[Any]:




   """simple docstring"""
   _SCREAMING_SNAKE_CASE       	=			float("""inf"""  )
   _SCREAMING_SNAKE_CASE       	=			-1
   for i in range(SCREAMING_SNAKE_CASE_  ):
      if (not vset[i]) and mdist[i] < min_val:
         _SCREAMING_SNAKE_CASE       	=			i
         _SCREAMING_SNAKE_CASE       	=			mdist[i]
   return min_ind
def 				lowerCAmelCase_		(			SCREAMING_SNAKE_CASE_      , SCREAMING_SNAKE_CASE_      , SCREAMING_SNAKE_CASE_  )       ->       int:




   """simple docstring"""
   _SCREAMING_SNAKE_CASE       	=			[float("""inf"""  ) for _ in range(SCREAMING_SNAKE_CASE_  )]
   _SCREAMING_SNAKE_CASE       	=			[False for _ in range(SCREAMING_SNAKE_CASE_  )]
   _SCREAMING_SNAKE_CASE       	=			0.0

   for _ in range(v - 1  ):
      _SCREAMING_SNAKE_CASE       	=			min_dist(SCREAMING_SNAKE_CASE_      , SCREAMING_SNAKE_CASE_      , SCREAMING_SNAKE_CASE_  )
      _SCREAMING_SNAKE_CASE       	=			True

      for i in range(SCREAMING_SNAKE_CASE_  ):
         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(SCREAMING_SNAKE_CASE_      , SCREAMING_SNAKE_CASE_  )


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

     UpperCamelCase__ :						Optional[Any]    							=					[[float("inf") for i in range(V)] for j in range(V)]

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

     for i in range(E):
          print("\nEdge ", i + 1)
          UpperCamelCase__ :						Union[str, Any]    							=					int(input("Enter source:").strip())
          UpperCamelCase__ :						Tuple    							=					int(input("Enter destination:").strip())
          UpperCamelCase__ :						Any    							=					float(input("Enter weight:").strip())
          UpperCamelCase__ :						List[Any]    							=					weight

     UpperCamelCase__ :						Optional[Any]    							=					int(input("\nEnter shortest path source:").strip())
     dijkstra(graph, V, gsrc)






