hdu2199 Can you solve this equation? (二分搜索)
来源:互联网 发布:淘宝开放平台 教程 编辑:程序博客网 时间:2024/05/18 01:14
#include <stdio.h>#include <math.h>int func(double x){return 8*x*x*x*x+7*x*x*x+2*x*x+3*x+6;}int main(){int n;double left,right,mid,Y;scanf("%d",&n);while(n--){scanf("%lf",&Y);if(Y>func(100)||Y<func(0))printf("No solution!\n");else{right=100.0;left=0.0;while((right-left)>1e-8){mid=(left+right)/2.0;if(func(mid)<Y)left=mid;elseright=mid;}printf("%.4lf\n",left);}}return 0;}
- hdu2199 Can you solve this equation? (二分搜索)
- 二分搜索--控制精度--hdu2199 Can you solve this equation
- HDU2199:Can you solve this equation?(二分)
- HDU2199 Can you solve this equation?(二分)
- hdu2199 Can you solve this equation? (二分+double精度)
- hdu2199 Can you solve this equation?(二分)
- 【hdu2199】Can you solve this equation?——二分
- HDU2199:Can you solve this equation?(数学 + 二分)
- ACM-二分搜索之Can you solve this equation?——hdu2199
- HDU2199 Can you solve this equation?
- hdu2199 Can you solve this equation?
- HDU2199 Can you solve this equation?
- hdu2199 Can you solve this equation?
- (step4.1)hdu2199(Can you solve this equation?——二分查找)
- HDU2199 Can you solve this equation 二分求方程的根
- hdu2199 Can you solve this equation?(二分查找,多项式求解)
- hud 2199 Can you solve this equation?(二分搜索)
- HDUoj 2199 Can you solve this equation?(二分搜索)
- Android管理应用程序资源
- ffmpeg框架结构解读
- Sql Server 中如何循环遍历查询结果
- 读书与学习
- ubuntu 建立samba
- hdu2199 Can you solve this equation? (二分搜索)
- 【python初学】Python批量解压RAR脚本
- Android UI界面
- 自定义的AlertDialog获取软键盘和editext中的内容
- psexec 首次执行需要验证问题
- Hibernate的优化方案
- 正在使用或者导入的项目,项目名那里出现了红色感叹号解决方案
- SQL数据类型
- 这样解决浏览器不兼容问题