← All problemsSign in

Maximum Money

Once Chef was going through the stuff he has in his basement and to his surprise he found $N$ metal balls, each with different weight. Our Chef who is always searching for a way to earn money has decided to sell these balls to gain free money. To his luck, he has found a dealer who is ready to buy these balls but the dealer has agreed to buy only $M$ number of balls. The dealer has also told Chef

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