PRPALN getting RE(SIGSEGV)

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 .

Eg.

int arr[5];
printf("%d",arr[6]);

Check your code and make sure you are accessing a allocated memory .

Happy Coding.

2 Likes

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: CodeChef: Practical coding for everyone
And here’s the link to the question: CodeChef: Practical coding for everyone

Thanks in advance to you.