POJ-1905
来源:互联网 发布:java中间件框架 编辑:程序博客网 时间:2024/05/20 21:23
#include <iostream>#include <math.h>#include <stdio.h>using namespace std;double PI=cos(-1.0);int main(){double L,n,C; while(scanf("%lf%lf%lf",&L,&n,&C)!=EOF){ if(L<0&&n<0&&C<0)break; double L2; // cin>>L>>n>>C; L2=(1+n*C)*L; double low=0; double high=PI/2+1;//·¶Î§¿Óµù double mid; if(L<1e-13){ printf("0.000\n"); continue;} while(low+1e-15<high){ mid=(low+high)/2; if(mid-sin(mid)*(1+n*C)<0){ low=mid;}else {high=mid;}}double r=L2/(2*mid);//cout<<r-r*cos(mid)<<endl;printf("%.3f\n",r-r*cos(mid)); } return 0;}
0 0
- POJ 1905
- POJ 1905
- poj 1905
- POJ 1905
- poj 1905
- poj 1905
- poj 1905
- POJ-1905
- POJ 1905
- POJ 1905
- POJ 1905 Expanding Roads
- poj-1905 Expanding Rods
- POJ 1905,3122,3273
- poj 1905 Expanding Rods
- 二分法 poj 1905
- POJ 1905 Expanding Rods
- poj 1905 二分
- poj 1905
- POJ-1321
- mysql 如何将一个数据库中某个表中某个字段导入另外一个数据库里指定表里
- Properties工具类获取配置文件数据
- POJ-1458
- google codejam 2008 round2
- POJ-1905
- Spring3.2和jdk1.8之间的兼容性错误
- String,StringBuffer与StringBuilder的区别
- 输入一组单词(区分大小写),统计首字母相同的单词的个数
- C++cin方法小结
- elasticsearch中ik分词的使用
- POJ-1915
- POJ-2251
- SpringMVC--拦截器