WA in Problem based on Ternary search. HELP!!

Правка en2, от TimberLee, 2016-06-07 23:18:53

I am trying to solve this problem using ternary search.

It asks to find the maximum of the function x^a·y^b·z^c. Where, x+y+z <= S.

I submitted the following solution which is giving WA. link

However, this AC solution is very similar.

Can somebody help ?

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский TimberLee 2016-06-07 23:18:53 313
en1 Английский TimberLee 2016-05-31 18:26:00 387 Initial revision (published)