三分探索
https://qiita.com/ganariya/items/1553ff2bf8d6d7789127