#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. IT码农哥放弃50万年薪:辞职卖咖喱凉皮(背后深藏功与名)_互联网的一些事

    IT码农哥放弃50万年薪:辞职卖咖喱凉皮(背后深藏功与名)_互联网的一些事 IT码农哥放弃50万年薪:辞职卖咖喱凉皮(背后深藏功与名)

  2. adb devices: no permissions

    现象: #sudo adb root Error:insufficient permissions for device #adb devices List of devices attached ? ...

  3. 迁移ADT/ANT构建的Android项目至Gradle,a walk through。

    LibModule 配置更新 9 months ago   app 配置更新 9 months ago   gradle/wrapper 配置更新 9 months ago   screenshots ...

  4. GitHub for Mac

    GitHub for Mac 安装 1.从 mac.github.com 下载最新版本的 GitHub. 2.当你开启软件时,你可以选择用你的 GitHub 账户登录,或者新建一个账户. 3.在左侧, ...

  5. [oracle安装错误处理]ORA-00600: [keltnfy-ldmInit][46], [1], []

    原博文:http://blog.itpub.net/519536/viewspace-614893/ 今天在部署一套10g Oracle(10.2.0.3版本)的过程中,偶遇ORA-00600: in ...

  6. swift - if let Optional 语法

    var optionalString: String? = "facial"; var greeting = "hi"; if let name = optio ...

  7. Robotium API -- 除click/clickLong外的其他操作

    拖动操作 void drag (float fromX, float toX, float fromY, float toY, int stepCount) 选定两个位置,进行拖动操作(这里的拖动操作 ...

  8. [RxJS] Creation operators: fromEventPattern, fromEvent

    Besides converting arrays and promises to Observables, we can also convert other structures to Obser ...

  9. unity3d触屏操作对象运动

    using UnityEngine; using System.Collections; public class robot : MonoBehaviour { private GameObject ...

  10. C#中的序列化与反序列化

    眼看XX鸟的课程关于C#的知识点就要学完了,翻看网络中流传的教程还是发现了一个课程中没有讲到的知识点:序列化与反序列化 无奈还是了解一下并操作一番,以备后用吧 介绍:就是将对象信息转化为二进制信息以便 ...