ABC 204 E — Rush Hour 2 why ternary wont work

Правка en1, от It_Wasnt_Me, 2021-06-08 12:19:31

I tried to solve this problem in the contest but unfortunately I was getting WA on 6 tests

I thought that I had implementation bugs, after I read the tutorial I found that "Note that you cannot directly apply ternary search when searching for the optimal solution. Can you figure out why?"

Anyone know why ternary wont work here ? I guess that the function will always be something decreasing then increasing or always increasing, Am I right ?

my submission

Теги abc204

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский It_Wasnt_Me 2021-06-08 12:19:31 676 Initial revision (published)