摘要:
打表发现题中函数满足凸函数性质,于是三分。View Code #include <iostream>#include <math.h>#include <stdio.h>#define eps 1e-9using namespace std;int n;struct P{ double x,w;}p[50005];double Calc(double i){ double S=0.0; for(int j=0;j<n;j++){ S+=fabs((i-p[j].x)*(i-p[j].x)*(i-p[j].x))*p[j].w; } return S;. 阅读全文