I dont understand why I am getting RE for my code. I have tried to follow the faqs but still its giving SIGSEGV. Please help me. I want to atleast get a WA. Then I’ll know my logic is wrong.
Buddy SIGSEGV means segmentation fault. The most common cause of it is accessing non allocated memory .
Check your code and make sure you are accessing a allocated memory .
I’m quite sure that I’m doing a very silly mistake(if my approach isn’t completely wrong). Can you please help me find it? Here’s the link to my submission: http://www.codechef.com/viewsolution/5404034
And here’s the link to the question: http://www.codechef.com/NOV14/problems/PRPALN/
Thanks in advance to you.