摘要: ```c++ include include include include include include include include using namespace std; struct Point{ double x,y; Point(double x = 0,double y = 0) 阅读全文
posted @ 2017-05-31 20:32 rsqppp 阅读(74) 评论(0) 推荐(0)
摘要: 这个很简单的啊 "LA 10341" c++ include include include include include include include include using namespace std; define F(x) (p exp( x)+q sin(x)+r cos(x)+s 阅读全文
posted @ 2017-05-31 20:10 rsqppp 阅读(99) 评论(0) 推荐(0)
摘要: 主要根据是辛普森公式: 当然,辛普森公式正统的在算法竞赛中没什么卵用,因为实数区间无限划分,所以辛普森公式可以无限趋近于定积分值。很精确,但超时。 这时自带最短区间,还能跳过和定积分相差不大区间的自适应辛普森公式就成为替代品了。 目前还没码测试速度的题。 阅读全文
posted @ 2017-05-31 13:28 rsqppp 阅读(119) 评论(0) 推荐(0)
摘要: 二分可以求解单调函数最值,类比不难想到三分可以求解单峰函数。 何为单峰函数, 如果函数f(x)在区间[a, b]上只有唯一的最大值点(或最小值点)C,而在最大值点(或最小值点)C的左侧,函数单调增加(减少);在点C的右侧,函数单调减少(增加),则称这个函数为区间[a, b]上的单峰函数 如果函数f( 阅读全文
posted @ 2017-05-31 13:23 rsqppp 阅读(703) 评论(0) 推荐(0)