Getting Runtime Error in REVERSE

I am getting runtime error in my code can any on help me(used floyd warshalls algorithm )
Here is the link to my code.
https://www.codechef.com/viewsolution/9384729

//