Chef and Chocolates
CodeChefOpen on judge ↗
On the occasion of Republic day, Chef wants to give away chocolates to the students. N students are eagerly waiting for the Chef and they have formed a queue. Chef has u variety of chocolates. Looking at the strength of the students he is sure that he cannot provide chocolates of all the variety to all the students. He decided that he will start from ith student and end at jth student (0 ≤ i,j N)
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