LightOJ 1059 [ MST ] ( Please Help )

Правка en4, от ssavi, 2016-01-07 20:57:29

Can someone please Give some Idea about How can I solve this Problem ?? Please help .

Link :http://www.lightoj.com/volume_showproblem.php?problem=1059

I know that's a MST problem . And I found some point of Placing Airports . My idea is :

  1. I will run a MST .
  2. If the MST is able to connect all the Nodes then I Place just One Airport initially. And Then if the Cost of an Edge is Greater than or equal to the " Cost of Making an Airport " then I will place another Airport there & then Remove the Edge's Cost.
  3. If the is not able to connect all the Nodes then I Place an Air Port where the Parent of a Node is Equal to the Node itself including if the Cost of an Edge is Greater than or equal to the " Cost of Making an Airport " then I will place another Airport there & then Remove the Edge's Cost.

Am I Correct ?

If I am not Correct then Please give some Idea where am I doing Mistakes ???

If Correct Then Please Give some suggestion about How Can I do this regarding the Following Points :

i) Do I have to Check all Edges ( If there is Repetition of an Edge Multiple times with Several Cost ) or i just Have to Check (n-1) edges ??

ii) How can I place The Airports if the Cost of an Edge is Greater than or equal to the " Cost of Making an Airport " & Remove the edges Adjacent to it with Same/ Greater Cost .

Please help..

[ My English is Bad. Sorry for that ]

Теги lightoj, 1059

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en6 Английский ssavi 2016-01-08 06:13:26 8 Tiny change: 'ved . The what i am' -> 'ved . The process what i am'
en5 Английский ssavi 2016-01-08 05:54:40 187
en4 Английский ssavi 2016-01-07 20:57:29 3 Tiny change: ' And Then the Cost ' -> ' And Then if the Cost '
en3 Английский ssavi 2016-01-07 20:41:16 4
en2 Английский ssavi 2016-01-07 20:40:42 30
en1 Английский ssavi 2016-01-07 20:36:52 1413 Initial revision (published)