Box Stacking Problem

Sir unable to get the error in my code ?
What should I rectify in this ?
IDE : https://ide.codingblocks.com/s/195882

@aman2382000
Please have a look at this https://ide.codingblocks.com/s/195927

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

@aman2382000 What is the problem that you are facing?

Sir code is working fine but i still didn’t understood the concept of this question.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

Sir i am not able to understand the question. Can you please provide a detailed explanation or maybe a link of any video that could help me understand this question ?

@aman2382000 This is the editorial of the problem. https://practice.geeksforgeeks.org/problems/box-stacking/1

This is the video editorial:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.