Hi,
In a recent contest, I came across a problem in which the basic idea was:
"There are x coins of value a and y coins of value b, they must be distributed among N children in such a way that each child gets amount= number_of_coins_of_type_A*a+ number_of_coins_of_typeB*b , number of coins of each type>=0
Find the maximum amount of money that the child with minimum amount among the N can get? "
Any leads or hints regarding the approach would be very helpful.
Thanks in advance.
My first intuition is to distribute uniformly. So that, we can maximize the minimum.
Hi, what exactly do you mean by uniformly? The value of both the coins and the number are different. So how can I approach with a uniform distribution in this problem? And is there a category of problems in which this problem lies?
Can you please provide the problem link? I want to check whether my idea is correct or not?
here is the link, the contest is closed now and there is no editorial :/
https://www.hackerrank.com/contests/uwbcode2020-qualification/challenges/d-compensation