二分&三分搜索
Falling~
这个作者很懒,什么都没留下…
展开
-
三分搜索--hdu3400 Line belt
In a two-dimensional plane there are two line belts, there are two segments AB and CD, lxhgww's speed on AB is P and on CD is Q, he can move with the speed R on other area on the plane. How long must原创 2017-08-08 09:48:28 · 226 阅读 · 0 评论 -
三分搜索--hdu3714 Error Curves
Josephina is a clever girl and addicted to Machine Learning recently. She pays much attention to a method called Linear Discriminant Analysis, which has many interesting properties. In order to tes原创 2017-08-07 21:36:02 · 222 阅读 · 0 评论 -
二分搜索--控制精度--hdu2199 Can you solve this equation
1.要求4位小数,精度可以开得更高些 2.可以取得到的一般r - l >= eps,有等号 3.r = mid - eps,l = mid + eps往2边都取eps 4.最后退出的时候仍然取mid,(l + r) / 2; #include #include #include using namespace std; const doubl原创 2017-08-04 18:07:16 · 326 阅读 · 0 评论 -
三分搜索--hdu2241 考研路茫茫——早起看书
考研并不是说说就可以了,要付诸于行动。 对于Lele来说,最痛苦的事莫过于早起看书了,不过为了考研,也就豁出去了。由于早起看书会对看书效率产生影响,所以对于要什么时候起床看书,还是有必要考虑的。 经过周密的调查,Lele发现早起的时间会对上午和下午的看书效率都产生影响,具体如下: 他把早起的程度标记为一个非负有理数X,X数值越大,表示越早起。 1.对上午的影响F:符合 F原创 2017-08-07 20:49:36 · 694 阅读 · 0 评论