Using Ternary search to find the maximum value of a function with 3 variablesWA in Problem based on Ternary search. HELP!!
Difference between en1 and en2, changed 313 character(s)
I am trying to solve [this](http://codeforces.com/problemset/problem/185/B) problem using ternary search.↵

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

understood the concept of ternary search but I am unable to apply it to this particular problemsubmitted the following solution which is giving WA.↵
[link](http://codeforces.com/contest/186/submission/18289965)↵

However, [this](http://codeforces.com/contest/186/submission/1656097) AC solution is very similar
.↵

Can somebody help ?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English TimberLee 2016-06-07 23:18:53 313
en1 English TimberLee 2016-05-31 18:26:00 387 Initial revision (published)