Cutting Recipes : SIGABRT error

The program is working fine in my computer but codechef is not accepting the solution showing “Runtime Error(SIGABRT)”

link: https://www.codechef.com/viewsolution/10916288

It happens when you make stupid mistakes!