March Challenge 2015 - Matrix

What’s the probable reason for Runtime Error (RE-SIGSEGV) of this problem?

Any help would be appreciated!

Is it because of memory usage? What’s the memory limit for this problem?