I am trying to solve [this](http://codeforces.me/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.↵
↵
Iunderstood 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.me/contest/186/submission/18289965)↵
↵
However, [this](http://codeforces.me/contest/186/submission/1656097) AC solution is very similar.↵
↵
Can somebody help ?
↵
It asks to find the maximum of the function x^a·y^b·z^c.↵
Where, x+y+z <= S.↵
↵
I
[link](http://codeforces.me/contest/186/submission/18289965)↵
↵
However, [this](http://codeforces.me/contest/186/submission/1656097) AC solution is very similar.↵
↵
Can somebody help ?