Gourav and Candies
CodeChefOpen on judge ↗
Gourav got a celebration pack (full of candies) on his birthday. The pack contains $N$ candies (numbered $1$ to $N$ ). For each i, the $i-th$ candy has a sweetness value $Ci$ . Gourav wants to eat all the candies in the first half of the pack and giveaway all remaining candies. He does not like candies that are too sweet. In order to prevent eating too sweet candies, he will perform some shift ope
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