hdu 2199 Can you solve this equation?
来源:互联网 发布:谷嫂淘宝店叫什么名字 编辑:程序博客网 时间:2024/05/16 07:41
本题链接:http://acm.hdu.edu.cn/showproblem.php?pid=2199
本题用二分法查找,AC代码:
#include<stdio.h>#include<math.h>double F(double x){double s=8*x*x*x*x+7*x*x*x+2*x*x+3*x+6;return s;}int main(){int T;scanf("%d",&T);while(T--){double m;scanf("%lf",&m);if( m > F(100) || m < F(0) ) printf("No solution!\n");else{double left,right,mid;left=0;right=100;while(right-left>1e-8){mid=(left+right)/2;if(m-F(mid)>1e-8)left=mid;else right=mid;}printf("%.4lf\n",mid);}}return 0;}
0 0
- hdu 2199 Can you solve this equation?
- hdu 2199 Can you solve this equation?
- hdu 2199 Can you solve this equation?
- HDU 2199 Can you solve this equation?
- hdu 2199 Can you solve this equation?
- HDU 2199-Can you solve this equation?
- hdu 2199 Can you solve this equation?
- hdu 2199 can you solve this equation
- HDU 2199 Can you solve this equation?
- HDU 2199 Can you solve this equation?
- hdu 2199 Can you solve this equation?
- HDU 2199 Can you solve this equation?
- HDU 2199 Can you solve this equation?
- HDU 2199 Can you solve this equation?
- hdu 2199 Can you solve this equation?
- hdu 2199 Can you solve this equation?
- hdu 2199 Can you solve this equation
- hdu-2199 Can you solve this equation?
- [leetcode 97]Interleaving String
- android 读取原始(Raw)资源 作为数据库文件
- hdu 1080 Human Gene Functions
- mac各种快捷键汇总
- 无root手机版抓android包工具,超好用
- hdu 2199 Can you solve this equation?
- Qt 鼠标右击菜单建立
- 【原文件】tinyxmlerror.cpp
- vba如何连接db2数据库
- iphone 6plus 下app里的状态栏和界面会被放大的问题
- POJ2387(最短路基础)
- Windows配置Android开发环境全部资源下载及配置教程
- 谈谈iOS中粘性动画以及果冻效果的实现
- 【原文件】tinyxmlparser.cpp