![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
二分法
01的世界
有时,失去了才懂得珍惜
展开
-
Codeforces 251A+(五一训练 C)+二分法
A. Points on Line time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Little Petya likes points a lot. Recently his mom h原创 2015-05-05 23:36:45 · 598 阅读 · 0 评论 -
hdu 2199 高精度二分模板
#include #include #include #include #include #include #include #include #include #define INF 10e7 using namespace std; const int maxn=505; double deal(double x) { return 8*pow(x,4)+7*pow(x,3)原创 2016-01-21 16:02:33 · 299 阅读 · 0 评论 -
hdu 2899 二分+数学
分析:要找一个值最小的,对F(X)求导,再求导,发现二阶导恒大于0,那么说一阶导数单调递增,所以说要找F‘(x)=0的点,这样的话就是最小值 #include #include #include #include #include #include #include #include #include #define INF 10e7 using namespace std原创 2016-01-21 16:40:01 · 338 阅读 · 0 评论 -
Codeforces 609D 贪心+二分
D. Gadgets for dollars and pounds time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Nura wants to buy k gadgets. She ha原创 2015-12-23 23:14:46 · 460 阅读 · 0 评论 -
Codeforces 620D STL+二分
题目:620D - Professor GukiZ and Two Arrays 题意: 交换两数组中的元素最多两次,使两数组差值最小 分析: 对于0次和1次的情况,元素2000个,暴力枚举就行,但是对于交换两次的,因为交换方案也有很多种情况,预测也是暴力,但怎么暴力呢?看了题目的标签是二分,也往这方面考虑。想了很久,不会啊(囧),看了大神的博客:http://www.cnblo原创 2016-03-18 00:27:33 · 618 阅读 · 0 评论