Larva Mesaj tarihi: Şubat 22, 2011 Mesaj tarihi: Şubat 22, 2011 Baya ugrastim ama bulamadim direk kopyaliyorum. After escaping Raptor Island, Aaron finds himself on Treasure Island. The island forms a directed graph of which he is currently at a start node s. Each edge has weight 0,1,2...K. Each node has buried treasure, but he can't carry the treasure from more than 1 node simultaneously without returning to his ship at s. Therefore, he wants to find the shortest path from s to all other nodes in the network (you need not worry about return paths). Give an O(K|V| + |E|) algorithm to determine these paths. Kisaca tek baslangic noktasindan butun noktalara en kisa yollarin bulunmasi gerekiyor. Dijkstra yi sonuna kadar kosturursan olur tabi ama O(VlogV+E) de olur. Weightlerin 0 la K arasinda olmasini bir sekilde kullanmak gerekiyor BFS le Dijkstra karisimi bir yontem gerekiyor sanirim ama bulamadim bir turlu.
Öne çıkan mesajlar