Can anyone explain me the the example 3rd , How the answer of this 3rd example is 5?
Problem statement : http://www.codechef.com/OCT14/problems/PRPOTION
Can anyone explain me the the example 3rd , How the answer of this 3rd example is 5?
Problem statement : http://www.codechef.com/OCT14/problems/PRPOTION
We have :- {(1, 2, 3) , (2, 4) , (6, 8)}
Steps:
At the third step we have max liquid = 5
@ankit_kumar
How you chose 2nd set 1st ,
it should be 3rd na
B/c maximum liquid we can reduce in third set first
So my doubt is which set to choose when?
But on what basis we are choosing the set?
At least you can tell me that?
the last test case allowed only 2 steps right so how do you have 3 in your explanation ?
Why 3 times division???
I think “at most” thing plays role here. We can perform magical tricks at most equal to 2 or less than that.
Magic trick is performed just once. Dividing 3rd set -> {(2,3,4),(3,5),(3,4)}
In one step, we get maximum liquid as 5. But, again this is hell lot of confusion! -_-
And now, they have changed the answer to 4. I cannot make up any more plots to get the answer. This time the contest is highly messed up.
Well this is just a hell! Not a clear explanation and when I finally made the logic they changed the problem! What the Hell