2013年9月7日
摘要: 链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=4222题意:定义F(x) = max(Si(x)),i= 1...n.x的范围为[0, 1000].Si(x)=ai x2+ bi x + ci .思路:F(x)是一个单峰函数,用三分法求极值,注意下精度。#include#includeusing namespace std;const int maxn=10000+5;int a[maxn],b[maxn],c[maxn] 阅读全文
posted @ 2013-09-07 16:09 ∑求和 阅读(219) 评论(0) 推荐(0) 编辑
摘要: 链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1282题意:Solve the equation:p*e-x+q*sin(x) +r*cos(x) +s*tan(x) +t*x2+u= 0. where0 =0,F(1)#include#define F(x) (p*exp(-x)+q*sin(x)+r*cos(x)+s*tan(x)+t*(x)*(x)+u)const double eps=1e-14;int main( 阅读全文
posted @ 2013-09-07 11:01 ∑求和 阅读(286) 评论(0) 推荐(0) 编辑