← All problemsSign in

Steal Your Luck

Deedee plans a heist. He is standing in front of a jewellery shop having 2 side doors. The jewellery shop has a long table over which $N$ jewellery items, each having a cost $C_i$ (1 <= $i$ <= N) associated with it are kept at rest. Deedee finds a bag which can carry upto $N-1$ such items. Since it's dark inside the shop and switching the lights ON maybe risky, he blindly picks up the items unt

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