Bob and More Candies
CodeChefOpen on judge ↗
Bob is at a candy store. There are $N$ candies in the store. The sweetness of ith candy is $A_i$. The total sweetness of the candies is the sum of individual sweetness of the candies bought. Bob wants to get maximum total sweetness possible. But the store has some strange rule regarding buying candies. Given integers $L$ and $R$. If you buy some candies each of the adjacent bought candies should b
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