Overloading the of priority queue in stl

I first overloaded () operator in the implementation of dijkstra algo(with priority queue) in the problem REN2013G Problem - CodeChef. It worked fine but when i tried to overload the greater than operator , it gave WA.
AC solution link:CodeChef: Practical coding for everyone
Wa solution link:CodeChef: Practical coding for everyone
Can anybody please clarify if it is a conceptual flaw or concept of overloading has issues with online judges??