Cake Walk
CodeChefOpen on judge ↗
The fat lady at the circus likes to eat a lot. She especially likes cakes. There is a line of N bakeries in her town. The bakeries are numbered from 1 to N. Whenever she enters a bakery to eat cakes, she frightens everybody by her huge size. She then takes advantage of this situation and eats all the cakes in that bakery. When this happens, the two adjacent bakeries lock themselves down so that t
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