Getting a score of only 63.64. Unable to figure out for which test cases it’s failing. Spoj Toolkit also has wrong answers so can’t use that.
Pasting the ideone link for code here. Any suggestions would be welcome. I have used Prim’s algorithm with adjacency list along with java fast I/O