'''simple docstring'''

from __future__ import annotations




class 		SCREAMING_SNAKE_CASE_					:



			"""simple docstring"""






			def __init__(							self				,			snake_case_					):
									snake_case :       Tuple				=    vertices
									snake_case :       int				=    [[0] * vertices for _ in range(snake_case_					)]



			def   lowerCamelCase (							self				,			snake_case_					):
									print("Vertex \t Distance from Source"					)
									for vertex in range(self.vertices					):
															print(snake_case_				,			"\t\t"				,			distances_from_source[vertex]					)



			def   lowerCamelCase (							self				,			snake_case_				,			snake_case_					):
									snake_case :       List[str]				=    1e7
									snake_case :       Union[str, Any]				=    0

									# Search not nearest vertex not in the shortest path tree
									for vertex in range(self.vertices					):
															if distances_from_source[vertex] < minimum and visited[vertex] is False:
																					snake_case :       List[Any]				=    distances_from_source[vertex]
																					snake_case :       Optional[Any]				=    vertex
									return min_index






			def   lowerCamelCase (							self				,			snake_case_					):
									snake_case :       Optional[int]				=    [int(1e7					)] * self.vertices  # distances from the source
									snake_case :       str				=    0
									snake_case :       Union[str, Any]				=    [False] * self.vertices

									for _ in range(self.vertices					):
															snake_case :       List[Any]				=    self.minimum_distance(snake_case_				,			snake_case_					)
															snake_case :       List[str]				=    True

															# Update dist value of the adjacent vertices
															# of the picked vertex only if the current
															# distance is greater than new distance and
															# the vertex in not in the shortest path tree
															for v in range(self.vertices					):
																					if (
																					    self.graph[u][v] > 0
																					    and visited[v] is False
																					    and distances[v] > distances[u] + self.graph[u][v]
																					):
																											snake_case :       int				=    distances[u] + self.graph[u][v]

									self.print_solution(snake_case_					)


if __name__ == "__main__":
						A_	   = Graph(9)
						A_	   = [
						    [0, 4, 0, 0, 0, 0, 0, 8, 0],
						    [4, 0, 8, 0, 0, 0, 0, 11, 0],
						    [0, 8, 0, 7, 0, 4, 0, 0, 2],
						    [0, 0, 7, 0, 9, 14, 0, 0, 0],
						    [0, 0, 0, 9, 0, 10, 0, 0, 0],
						    [0, 0, 4, 14, 10, 0, 2, 0, 0],
						    [0, 0, 0, 0, 0, 2, 0, 1, 6],
						    [8, 11, 0, 0, 0, 0, 1, 0, 7],
						    [0, 0, 2, 0, 0, 0, 6, 7, 0],
						]
						graph.dijkstra(0)






'''simple docstring'''

from __future__ import annotations


def        UpperCAmelCase__   (				_lowerCAmelCase    :			list[int | float])    ->		int | float:



						"""simple docstring"""

						if len(_lowerCAmelCase) == 0:
												raise ValueError("find_max() arg is an empty sequence")
						snake_case :       Any				=    nums[0]
						for x in nums:
												if x > max_num:
																		snake_case :       int				=    x
						return max_num


if __name__ == "__main__":
						import doctest

						doctest.testmod(verbose=True)





