GALACTIK : getting WA

@amitrc17, i think you are right . lets notify the author then.

how? starting a different thread?

already started a new thread

@a9393j007 pleaseā€¦explain meā€¦for the input 8 5,2 3,4 5,6 7,7 8,8 2,1,-1,2,3,-1,4,1,3
the connected planets are
1 (1)

2,3,6,7,8 (1)for 7
and 4,5 (3) for 4

the correct answer should be 6 and not 5
bcz cost of connecting planet 1 and 7 is = 1+1=2
and cost of connecting planet 1 and 4 is = 1+3 =4
so total cost = 2+4 = 6

1 Like

my solution is giving right ans for all the above test cases bt Wrong Answer on submissionā€¦Here is the link to my solutionā€¦ http://www.codechef.com/viewsolution/5478497 ā€¦plz helpā€¦