
三分
Stephencurry‘s csdn
这个作者很懒,什么都没留下…
展开
-
Turn the corner (HDU-2438)(三分查找)
Mr. West bought a new car! So he is travelling around the city. One day he comes to a vertical corner. The street he is currently in has a width x, the street he wants to turn to has a width y. The ca...原创 2019-12-23 17:44:08 · 213 阅读 · 0 评论 -
三分查找
当答案具有可二分性时,我们可以用二分答案来解决。但是,如果要求出凸性函数或凹性函数的最值时,二分就毫无用武之地了,这时,我们就可以用三分法来求出答案。 一个凸性序列/凹性序列通俗的说法就是在该序列最大值/最小值的左边满足不严格单调递增/递减,右边满足不严格单调递减/递增。如1,2,3,6,4是一个凸性序列,而5,4,4,3,1,2,4,6是一个凹性序列(见下图),而图中的6和1就分别是两个序列...转载 2019-12-23 16:53:20 · 334 阅读 · 0 评论