← All problemsSign in

Malvika gets bored along with her Cats

Malvika's cats, Chingam and Jimma are also bored of solving problems. Fortunately, Chingam has found **n** bars of dark chocolate. They all have the same width, but differ in their lengths. In fact, no two chocolate bars have the same length. All the **n** bars are kept in a row. Let's say that their lengths are given by **L[1], L[2], … , L[n]** from left to right. That is, length of bar **i** is

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