Please provide detailed explanation on how to solve IITWPC4I  Petya and Repairment of Roads from spoj. asked 05 Apr, 08:10

Read this carefully >>> "Note that a milkmen does not need to go to some other milkmen for milk as he can take milk from his own home. ". Now we can connect milkmen with a zero weight edge and calculate MST of the resulting answer. In this way each home will be connected to a milkmen with minimum cost. Hope it helps! answered 05 Apr, 22:14
