Help in debugging an ICPC problem (PENS)solution

Hi everyone,
The problem is from ICPC 2019 online round.The problem code is PENS.
CodeChef: Practical coding for everyone.
I am getting RUNTIME Error(SIGABRT) .Below is my link for the solution.
CodeChef: Practical coding for everyone.
I have commented it properly so that anyone can understand.I would request the community to kindly help me in this regard.
Thanks in advance…

See this post for hints on one of the things that’s wrong and how you can discover that for yourself :slight_smile:

1 Like

Sir,are you asking me to use compiler flags?

Yes, please compile your solution (locally) with the flags in that post and then run it with the sample input. You are making almost exactly the same mistake as the guy in the linked post :slight_smile:

3 Likes

Sir, I do not know how to thank you properly for this immense immediate help you provided to me.
Thank you,thank you a lot. It would have been impossible to debug it without your help.

1 Like