← All problemsSign in

God Bless Saurav

Problem Description Saurav is a lazy person. His semester exams are coming up and he has N subjects. He has M relatives and he believes that the blessings from relatives will make him pass the exams. The ith of the M relatives can give him a specific amount of blessing: R[i]. The ith relative can give the blessing R[i], any number of times. The ith of the N subjects requires S[i] blessings 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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start