Getting Run-Time error for problem: Chef and Price Control

For this Q:-

https://www.codechef.com/JUNE20B/problems/PRICECON

I am getting a run-time error. I have done this Q using structures. Can you please help me in solving this issue.

My code for this Q is:-

@g.bhanuteja23 sorry but ongoing contest discussions are not allowed so just mark the doubt resolved :smiley:

Ok Sir. Then how can I know why I am getting run-time error even though according to me I have written correct code.

@g.bhanuteja23 here refer this
https://www.quora.com/What-causes-run-time-errors-in-a-C++-program

1 Like

Ok. Then will try to resolve it myself.

Anyway thanks for the link to article.