double l = 0,r = 10000; while(r-l>=0.01){//精度问题 double m1 = l + (r-l)/3.0,m2 = r - (r-l)/3.0; if(f(m1)<f(m2)) l = m1; else r = m2; }
2024-03-20 19:02:52
double l = 0,r = 10000; while(r-l>=0.01){//精度问题 double m1 = l + (r-l)/3.0,m2 = r - (r-l)/3.0; if(f(m1)<f(m2)) l = m1; else r = m2; }
下一篇:蓝桥杯省赛-奖券数目