Wrong answer in second subtask of CLIQUED.

I solved the problem CLIQUED in the same way as mentioned in the editorail using Dijkstra with little modification.But got wrong answer on the second subtask.

Some one please help me out.

Code link:link text

//