I'm using Floyd-Warshall (of course).
I get WA if I put the distance from a node to itself at 0, and I get AC if I put it to infinity !
![:o](./images/smilies/icon_eek.gif)
That's the only change I did to get AC !
Well, I got rank 1 so I'm not going to complain
![:)](./images/smilies/icon_smile.gif)
I can't think of testcases where the dist from a node to itself has an impact on the answer.