Run time error or memory limit exceeded

I am in a weird situation right now.
My answer is correct for 2 test cases but it is displaying run time error for 3rd and last test case, i had used two 1d array and one 2d array where m and n are 10^5 , so am i coming across memory limit exceeded case or something else?

google search exist.

if the problem is not from ongoing contest then you can post the question link and your answer so i can debug the code…

This is from an on-going contest.

Since this is from an on-going contest, you cannot ask specific questions related to it. Here are some links to resolve RE/NZEC Error I found on Google Search.

yeah problem is from ongoing contest, so i won’t be able to share it