← All problemsSign in

Icing on cake

The chef has prepared huge amounts of cake for Gavneesh's birthday! As everyone knows, he just loves the icing on the cakes. Also everyone knows that frosting can be on top of the cake and on the boundaries. So, chef decides to make Gavneesh happy and maximise the amount of icing! For this problem, we will consider cakes as 2D rectangles. To increase the amount of icing the cakes can have, the c

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start