Блог пользователя VastoLorde95

Автор VastoLorde95, история, 11 лет назад, По-английски

Hi, In this problem, I am using the idea that AM >= GM just like in the editorial but with slightly different steps.

Equality should hold when all elements are equal. So according to me, x = y = z and the solution I arrive at is that x = y = z = S / 3

But this is incorrect as seen from the test case

S = 10

a = 1, b = 6, c = 3

My solution gives x = y = z = 3.33 and hence xa·yb·zc =  169350.87

But the optimal solution is x = 1.0, y = 6.0, z = 3.0 with xa·yb·zc =  1259712

What is the flaw in my math? Is this not a correct way to use GM <= AM? I don't understand why my solution differs from the solution given in the editorial even though the principle behind both is the same.

  • Проголосовать: нравится
  • +11
  • Проголосовать: не нравится

»
11 лет назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

why equal?

»
11 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

As far as I understood, you have to solve with x + y + z = S, where a, b, c, S is given.

»
11 лет назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

You wrote which is true and that equality will hold at x = y = z which is also true but there is no fixed value for the right hand side so it may be better for you to be less than a huge value than equal to a smaller one.

This is why we go according to this method

therefore,

I would have gone on but I am tired of manipulating LaTex symbols.

Some manipulation should show you that the term we want to maximize is now bounded above by a constant value (this is where the difference is between what your solution and authors solution) so you know that you can only get to that constant when and x + y + z = S.