Maria and Caps
CodeChefOpen on judge ↗
###PROBLEM STATEMENT Maria went to a shop with her mother to buy some woolen caps with exactly $K$ rupees. The shop contains $N$ no. of caps and cost of caps are given in the form of an array $A$. She was about to buy some caps but her mother interrupt her. As Maria belongs to a rich family, she doesn't care about money and decided to buy all the caps. Seeing her foolishness, her mother wants to
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