#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
using namespace std;
const double eps=1e-; double getarea(double a,double b,double c)
{
double p=(a+b+c)/2.0;
return (c*c/+sqrt(p*(p-a)*(p-b)*(p-c)));
} int main()
{
double x,y;
scanf("%lf%lf",&x,&y);
double l=x+y,r=sqrt(x*x+y*y),s1;
while(fabs(r-l)>eps)
{
double mid1=(r+l)/;
double mid2=(mid1+l)/;
s1=getarea(x,y,mid1);
double s2=getarea(x,y,mid2);
if(s1>s2)
l=mid2;
else
r=mid1;
}
printf("%.9lf\n",s1);
return ;
}

ural 1874 Football Goal的更多相关文章

  1. 三分--Football Goal(面积最大)

    B - Football Goal Time Limit:500MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64u Su ...

  2. 1874 football game(三分法and method to compute the area of trianngle)

    FInd the max area. 1. 三分法 2. NAN (not comparable with number) http://acm.timus.ru/problem.aspx?space ...

  3. ural 2067. Friends and Berries

    2067. Friends and Berries Time limit: 2.0 secondMemory limit: 64 MB There is a group of n children. ...

  4. ural 2063. Black and White

    2063. Black and White Time limit: 1.0 secondMemory limit: 64 MB Let’s play a game. You are given a r ...

  5. UVA 10194 Football (aka Soccer)

     Problem A: Football (aka Soccer)  The Problem Football the most popular sport in the world (america ...

  6. HDU-1225 Football Score

    http://acm.hdu.edu.cn/showproblem.php?pid=1225 一道超级简单的题,就因为我忘记写return,就wa好久,拜托我自己细心一点. 学习的地方:不过怎么查找字 ...

  7. Ural 1313 - Some Words about Sport

    Ural doctors worry about the health of their youth very much. Special investigations showed that a l ...

  8. D - Football (aka Soccer)

    Football the most popular sport in the world (americans insist to call it "Soccer", but we ...

  9. American Football Vocabulary!

    American Football Vocabulary! Share Tweet Share You’ll learn all about the vocabulary of American fo ...

随机推荐

  1. ubuntu12.04管理员账户登录不了桌面,只能客人会话登录

    ubuntu12.04管理员账户登录不了桌面,只能客人会话登录 求助!!ubuntu12.04管理员账户登录不了桌面,只能客人会话登录. 登录管理员账户时,输入密码后,一直在登录界面循环 费了好大劲啊 ...

  2. IE 文档模型设置 免去你IE 按F12去调文档标准的烦恼。

    英文原文:http://msdn.microsoft.com/en-us/library/cc288325(VS.85).aspx 最近在做一个前端页面,在各种浏览器上,各种差异,各种无赖.各种郁闷. ...

  3. Windows下连接调试Asus Nexus 7 Tablet

    Linux和mac下都能够直接连接,可是windows下必须下驱动.官网上的driver无论用.管用的是 https://drive.google.com/uc?id=0Bw8B2a85Qa1jSld ...

  4. java JMS消息队列

    http://blog.csdn.net/shirdrn/article/details/6362792 http://haohaoxuexi.iteye.com/blog/1893038 http: ...

  5. [CSS3] CSS Media Queries

    Using CSS media queries allows you to design responsive layout in your web apps and website. We will ...

  6. Adding Swap Files

    Adding Swap Files If you do not have free disk space to create a swap partition and you do need to a ...

  7. IPython notebook 使用介绍

    参考资料: http://mindonmind.github.io/2013/02/08/ipython-notebook-interactive-computing-new-era/ http:// ...

  8. JNI Java调用C代码 示例

    Activity public class MainActivity extends ListActivity {     static {         System.loadLibrary(&q ...

  9. 《fullPage.js》创建全屏滚动的网站

    插件介绍 fullPage.js是一个简单易用的插件,创建全屏滚动的网站(也被称为单页网站).它允许全屏滚动创建网站,以及添加内部滑块. 浏览器兼容性 主要功能 支持鼠标滚动 支持前进后退和键盘控制 ...

  10. 第一章 初识Lucene

    多看几遍,慢就是快 1.1 应对信息爆炸 1.2 Lucene 是什么 1.2.1 Lucene 能做些什么 1.2.2 Lucene 的历史 1.3 Lucene 和搜索程序组件 基本概念 索引操作 ...