Ternary Search

Revision en1, by notTehlka, 2021-06-11 10:55:47

Can someone please explain where can one use ternary search in a question. CP Algorithm states that ternary search is used when function f(x) which is unimodal on an interval [l,r]. But my question is how can one tell whether this condition holds or not? Is there some specific way?

Is ternary search applicable in this Div3 G. If yes, then how?

Tags ternary search, #help

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English notTehlka 2021-06-11 10:55:47 472 Initial revision (published)