HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Forums > Discussion of problems > topic:


Problem "50693 - Subway Cost"

There is a contest!

В настоящий момент идёт турнир. Некоторая информация и функции сервера недоступны до его окончания.

imesecanOct.07.2015 at 01:58:50 PM
0--- Test 1 ---
8
Durres
Tirane
Shkoder
Kavaje
Elbasan
Vlore
Korce
Kukes
10
Durres Tirane 40
Tirane Shkoder 80
Kavaje Durres 25
Elbasan Tirane 40
Vlore Durres 100
Korce Elbasan 70
Kukes Shkoder 50
Kavaje Tirane 25
Tirane Vlore 75
Durres Shkoder 75
3
Durres Tirane
Durres Vlore
Kukes Shkoder

--- Pattern ---
400

imesecanOct.07.2015 at 01:59:59 PM
1Pay attention to the relation between 100 and 9900. You can solve this question by using Minimum Spanning Trees.

Test 2: Input:
3
Dogana
Zogu_i_zi
Kombinat
6
Dogana Zogu_i_zi 3
Dogana Kombinat 2
Zogu_i_zi Kombinat 6
Zogu_i_zi Dogana 4
Kombinat Dogana 3
Kombinat Zogu_i_zi 5
1
Zogu_i_zi Kombinat


Output:
7


www.contester.ru