
自适应辛普森法
文章平均质量分 79
我不会额
这个作者很懒,什么都没留下…
展开
-
hdu4498 Function Curve 分段simpson
题目:给出k1,k2,…,kn, a1,a2,…,an 和 b1,b2,…,bn 求F(x)=min{100,min{ki*(x-ai)^2+bi | 0 要求x>=0&&x 思路:求出所有函数之间的交点,所有函数与y=100的交点,交点排序,累加相邻交点的曲线长度 代码: #pragma comment(linker, "/STACK:1024000000,1024000000")原创 2017-08-21 10:57:19 · 326 阅读 · 0 评论 -
UVALive - 6135 Environment Protection 二分+simpson
题目:给你宽为W,深度为D的一块区域,再给你p1,q1,p2,q2;y1=p1/q1,y2=p2/q2,让你确定一个深度d,使得y1y2之间的面积在W*d这个区域内为A. 思路:二分+辛普森 代码: #pragma comment(linker, "/STACK:1024000000,1024000000") #include #include #include #include #incl原创 2017-08-21 14:01:32 · 306 阅读 · 0 评论