Expanding Rods
#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std; const double eps=1e-;
double n,c,l; int main()
{
while(scanf("%lf%lf%lf",&l,&n,&c)&&l!=-&&n!=-&&c!=-){
double s=(+n*c)*l;
double low=,high=0.5*l,mid;
while(high-low>eps)
{
mid=(high+low)/;
double r=(*mid*mid+l*l)/(*mid);
double ss=*r*asin(l/(*r));
if(ss<s)
low=mid;
else
high=mid;
}
printf("%.3lf\n",mid);
}
return ;
}
Expanding Rods的更多相关文章
- POJ 1905 Expanding Rods
Expanding Rods Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 1 ...
- Expanding Rods(二分POJ1905)
Expanding Rods Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 13688 Accepted: 3527 D ...
- UVA 10668 - Expanding Rods(数学+二分)
UVA 10668 - Expanding Rods 题目链接 题意:给定一个铁棒,如图中加热会变成一段圆弧,长度为L′=(1+nc)l,问这时和原来位置的高度之差 思路:画一下图能够非常easy推出 ...
- UVA 10668 Expanding Rods
Problem A: Expanding Rods When a thin rod of length L is heated n degrees, it expands to a new lengt ...
- poj 1905 Expanding Rods(木杆的膨胀)【数学计算+二分枚举】
...
- POJ 1905:Expanding Rods 求函数的二分
Expanding Rods Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 13780 Accepted: 3563 D ...
- D - Expanding Rods POJ - 1905(二分)
D - Expanding Rods POJ - 1905 When a thin rod of length L is heated n degrees, it expands to a new l ...
- POJ 1905 Expanding Rods(二分)
Expanding Rods Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 20224 Accepted: 5412 Descr ...
- 1137 - Expanding Rods
1137 - Expanding Rods PDF (English) Statistics Forum Time Limit: 0.5 second(s) Memory Limit: 32 M ...
- LightOj1137 - Expanding Rods(二分+数学)
题目链接:http://lightoj.com/volume_showproblem.php?problem=1137 题意:有一根绳子的长度为l,在有温度的情况下会变形为一个圆弧,长度为 l1 = ...
随机推荐
- ISAP 简介
刘汝佳的蓝书上已经给出了大部分,先给上完整代码(以草地排水为例). #include<iostream> #include<algorithm> #include<cst ...
- POJ 2418 ,ZOJ 1899 Hardwood Species - from lanshui_Yang
Description Hardwoods are the botanical group of trees that have broad leaves, produce a fruit or nu ...
- View获取焦点
<EditText android:id="@+id/et_phoneNum" android:layout_width="match_parent" a ...
- android圆角View实现及不同版本这间的兼容
在做我们自己的APP的时候,为了让APP看起来更加的好看,我们就需要将我们的自己的View做成圆角的,毕竟主流也是将很多东西做成圆角,和苹果的外观看起来差不多,看起来也还不错. 要将一个View做成圆 ...
- 关于cocostudio加载UI json CCUIHELPER未声明问题
查看官方的文档,在文档的最后添加了如何加载项目.如下代码: UILayer* ul =UILayer::create(); ul->addWidget(CCUIHELPER->create ...
- JavaScript--execCommand指令集
execCommand方法是执行一个对当前文档,当前选择或者给出范围的命令.处理Html数据时常用 如下格式:document.execCommand(sCmd,交互方式, 动态参数) .其中:sCm ...
- maya和Unity中的坐标系旋转
maya软件是用的右手坐标系,默认旋转顺序是ZYX,即先绕Z轴旋转,再绕Y轴旋转,最后绕X轴旋转. 比如在maya软件中,右侧的旋转顺序是可选的,默认的选择是“XYZ”,其实物体旋转顺序是倒着念,即上 ...
- Mac 安装maven3.3.9
只记录一部分自己出错的内容 maven 3 与 jdk 版本的关系 之前安装的jdk是1.8 安装完maven(包括配置环境变量)之后,输入mvn -version 显示版本错误 ,百度之后发现是ma ...
- xp snapshot.
snap current active window(alt + Print Screen SysRq). snap the whole window (Print Screen SysRq).
- NSURLConnection下载
@interface AppDelegate () <NSURLConnectionDataDelegate> { NSMutableData *mData;} @end @impl ...