


from ..utils import DummyObject, requires_backends

class      __snake_case				(   metaclass=A_):
					SCREAMING_SNAKE_CASE_		:       Dict								=			['torch', 'librosa']
					def __init__(						self       :						Tuple	,      *_lowerCAmelCase       :						int	,      **_lowerCAmelCase       :						str  )							->					Union[str, Any]:



											'''simple docstring'''





											requires_backends(self	,      ['torch', 'librosa']  )
					@classmethod
					def 	a			(						cls       :						Union[str, Any]	,      *_lowerCAmelCase       :						Dict	,      **_lowerCAmelCase       :						int  )							->					Dict:



											'''simple docstring'''





											requires_backends(cls	,      ['torch', 'librosa']  )







					@classmethod
					def 	a			(						cls       :						Optional[int]	,      *_lowerCAmelCase       :						int	,      **_lowerCAmelCase       :						Union[str, Any]  )							->					str:



											'''simple docstring'''





											requires_backends(cls	,      ['torch', 'librosa']  )







class      __snake_case				(   metaclass=A_):
					SCREAMING_SNAKE_CASE_		:       int								=			['torch', 'librosa']
					def __init__(						self       :						str	,      *_lowerCAmelCase       :						Union[str, Any]	,      **_lowerCAmelCase       :						Any  )							->					List[str]:



											'''simple docstring'''





											requires_backends(self	,      ['torch', 'librosa']  )
					@classmethod
					def 	a			(						cls       :						Optional[int]	,      *_lowerCAmelCase       :						Any	,      **_lowerCAmelCase       :						Optional[Any]  )							->					List[Any]:



											'''simple docstring'''





											requires_backends(cls	,      ['torch', 'librosa']  )







					@classmethod
					def 	a			(						cls       :						List[Any]	,      *_lowerCAmelCase       :						Tuple	,      **_lowerCAmelCase       :						List[Any]  )							->					Optional[Any]:



											'''simple docstring'''





											requires_backends(cls	,      ['torch', 'librosa']  )






def    UpperCAmelCase					(  lowercase__						:					List[Any]				,					lowercase__						:					Optional[int]	):



			'''simple docstring'''





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




def    UpperCAmelCase					(  lowercase__						:					Optional[int]				,					lowercase__						:					Any				,					lowercase__						:					Tuple	):



			'''simple docstring'''





			a__					=  float("""inf"""	)
			a__					=  -1
			for i in range(lowercase__	):
						if (not vset[i]) and mdist[i] < min_val:
									a__					=  i
									a__					=  mdist[i]
			return min_ind




def    UpperCAmelCase					(  lowercase__						:					Optional[Any]				,					lowercase__						:					Tuple				,					lowercase__						:					List[Any]	):



			'''simple docstring'''





			a__					=  [float("""inf"""	) for _ in range(lowercase__	)]
			a__					=  [False for _ in range(lowercase__	)]
			a__					=  0.0

			for _ in range(v - 1	):
						a__					=  min_dist(lowercase__				,					lowercase__				,					lowercase__	)
						a__					=  True

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

			print_dist(lowercase__				,					lowercase__	)


if __name__ == "__main__":
	_lowercase				:					Any     					=int(input("""Enter number of vertices: """).strip())
	_lowercase				:					List[str]     					=int(input("""Enter number of edges: """).strip())

	_lowercase				:					List[str]     					=[[float("""inf""") for i in range(V)] for j in range(V)]

	for i in range(V):
		_lowercase				:					Dict     					=0.0

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

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

