
Hi, I am solving SuperClimber with matrix multiplication...
I am getting Memory limit exceeded on 21 & 22 test but I don't know why...
Can anybody help?

probably cause you're creating a new matrix in each of your recursion calls
. try powering it using the bitwise operations, or you can use the recursion with a pointer to the original matrix.

Yeah, you don't even need recursion :) Powering can be done with simple loop also

recursion is ok, just u r returning always matrix and it's too many memory ...
try to change it to void ...

Thanks :D
I changed powering and removed unnecessary mod operations and it passed...