Using structs to store each city’s message. Using Disjkstra algorithm to find the minimum distance to repair the necessary highways to guarantee all the cities are connected. Using Kruskal algorithm to get the minimum cost and get know the city to which we must pay maximum cost.