← All problemsSign in

Kumod and Arushi

Kumod and Arushi live in chefland. Government of chefland has decided to gift some money to the citizens of chefland as they are badly affected by demonetisation. All the N citizens of chefland may get equal or unequal amount of money. However some citizen X feels that , he must not get less than a certain amount of the money citizen Y gets. Arushi is the 1st citizen and Kumod is the last i.e. Nth

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