← All problemsSign in

Ron loves Candies

Problem description. Ron had a set of N bowls arranged in order, each containing some amount of special candies. He wants to move most of them to the first bowl. The candies can only be picked up in pairs and seeing as to how much he loves them, Ron eats one of the two every time he picks up a pair of candies. Also, since the bowls are enchanted, he can place a picked candy into its left adjacen

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