摘要:
三分法求下凸函数的最小值,可知,max(下凸函数,下凸函数)得到的函数认为下凸函数 1 #include <iostream> 2 #include <cstdio> 3 #include <cmath> 4 using namespace std; 5 const int maxn=10000+10; 6 double a[maxn],b[maxn],c[maxn]; 7 int n; 8 double solve(double x) 9 {10 double maxv=a[0]*x*x+b[0]*x+c[0];11 for(int i=0;i<n; 阅读全文
posted @ 2013-05-22 21:03
LJ_COME!!!!!
阅读(164)
评论(0)
推荐(0)
摘要:
贪心,没完全理解啊,明天再想想,今天已经想了一天了,唉 1 #include <iostream> 2 #include <cstdio> 3 #include <algorithm> 4 using namespace std; 5 const int maxn=1000+10; 6 int tian[maxn],qi[maxn]; 7 int main() 8 { 9 int n;10 while(scanf("%d",&n)&&n)11 {12 int i,j;13 for(i=1;i<=n;i++) 阅读全文
posted @ 2013-05-22 00:58
LJ_COME!!!!!
阅读(145)
评论(0)
推荐(0)

浙公网安备 33010602011771号