Pirates Gold
CodeChefOpen on judge ↗
Pirates’ Gold You have stolen the pirates’ gold! You have a number of pieces of gold worth various amounts of money. You can think of your loot as a set of positive integers (with possible duplicates). For example, the set {7, 10, 13, 4, 10, 24} means that you have: • 1 piece of gold worth $4. • 1 piece of gold worth $7. • 2 pieces of gold each worth $10. • 1 piece of gold worth $13. • 1 pie
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