Chefu and Chocolates
CodeChefOpen on judge ↗
Chefu on his birthday was gifted $N$ boxes of chocolates by his father Chef who cooks problems on Codechef. The $i$th box has $A[i]$ chocolates and is locked with $i$ locks. Since eating too many chocolates might damage Chefu's teeth, Chef had kept a daily limit of $d$ chocolates. So, Chefu is not allowed to eat more than $d$ chocolates a day. Also, Chef doesn't always want Chefu to eat chocola
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