MATRIX RELOADED

Can anyone expalain why is it giving TLE for the problem:http://www.codechef.com/problems/CDXM2.
Solution submitted by me:http://www.codechef.com/viewsolution/6056406.