mansisinha16's blog

By mansisinha16, history, 6 weeks ago, In English

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.

 
 
 
 
  • Vote: I like it
  • -5
  • Vote: I do not like it

»
6 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Please answer this guys.I wanna know .

»
6 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

My first intuition is to distribute uniformly. So that, we can maximize the minimum.

»
6 weeks ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

I'm not sure about the exact solution to this problem, I'm still trying, but I've solved a similar one in the past.

The basic idea is to identify the range in which the answer lies and applying Binary Search on this range to arrive at the most feasible solution.

Go through this blog to find a detailed explanation for a similar problem. I hope it helps. Head to the example section of this blog