Can somebody tell why I am getting run time error(SIGSEGV)
My soln:-http://www.codechef.com/viewsolution/3966627
See the constraints. N and M can be upto 10^5 and you are creating a matrix of size n*m. It will take approx 70 GB to create such a huge matrix and codechef doesn’t allow to use this huge memory. That’s why your are getting runtime error.
3 Likes
Thanks vikasnitt for your help