← All problemsSign in

Game of Pips

Sherlock is now taking a break from his current case and starts reviewing his famous case of "The N Orange Pips". He slips too deep into the case and gives you a puzzle. Sherlock has N boxes consisting of orange pips. The ith box contains Ai orange pips. He now wants you to take out some pips from each box (you may leave some boxes untouched), such that in all the boxes the remaining number of pi

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start