Jitesh and his GF
CodeChefOpen on judge ↗
As Valentine's Day has gone Jitesh forgot to gift her Gf Miku. Now she is not happy with him. Jitesh has money(M > 0) in her wallet and he visited the nearest store to get some gifts for her. The gift store has N number of gifts. Each gift is associated with some happiness with it. Jitesh now wants to buy gifts such that it maximises the happiness of her Gf. As he is good at maths and wants to se
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