PALNUM - Editorial

Thank you for your reply. But I have used floyd algorithm in line 49.

It would be great help for me, if someone provide a test case, where this code gives WA.
my code in c++ : CodeChef: Practical coding for everyone
Thanks in advance