Chef And Cupboards
CodeChefOpen on judge ↗
Chef’s wife asked Chef to build a cupboard of the following specifications. **Assume that the width of the base is $X$. Then the Length of the base should not exceed $(A-X)$ and the Height of the cupboard should not exceed $(B-X)$. Also The Volume of the Cupboard should be maximum.** Chef’s wife gives him the two integers $A$ and $B$ and asks him to find an integer $X$ such that the Volume is ma
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start