← All problemsSign in

GameOfCoins

Problem description Shawna wants to buy an expensive necklace from Jack. She has n coins, the value of the i-th coin is ci.The price of the necklace is k, so Shawna will take a subset of her coins with sum equal to k and give it to Jack. Looking at her coins, a question came to her mind: after giving the coins to Jack, what values can Jack make with them? She is jealous and she doesn't want Ja

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