Willy Wonka and Candies
CodeChefOpen on judge ↗
Problem description Willy Wonka has gone to collect berries for his candy. He finds a rather odd kind of bush with berries growing on the bush in a straight line.Willy also observed that the sweetness imparted by the berries to the candy produced depended on the berries he plucked. He saw that the sweetness imparted by the berry he plucked would depend on whether the neighboring berry will also
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