WA with Problem Paths and Trees

Revision en1, by svg_af, 2016-03-29 16:36:49

Hello there

I'm trying to solve this problem where i have to find the minimum shortest path spanning tree from vertex u

I'm trying to solve it with dijkstra where i take the shorter edge when two paths are equal to the same node ... and i found that what i've been doing is the intended solution from the editorial

but i keep getting WA on test 8 and it says duplicate edges ... but i can't see where my code could do that

here is my submission

please help :/

Tags graph, greedy, wa, dijkstra

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English svg_af 2016-03-29 16:36:49 618 Initial revision (published)