Valentine day special
CodeChefOpen on judge ↗
It is Valentine's day. Sankar went to a theme park to enjoy the day with his girl friend. There are 'N' couple rides in the theme park. Sankar's budget for spending is 'M' rupees. Sankar is a clever guy. He never spends more than his budget. A ride 'i' costs 'Ci' rupees. Sankar had 'K' discount coupons which he got from his friend Sivakumar. If Sankar uses a coupon on a ride 'i', then the ride cos
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