分析:告诉协调的房子,每年(0,0)作为一个半圆区域的中心将被添加50。请教如何多年以来,这家的位置将是半圆内。注意pi必须采取3.1415926管辖权。

#include<iostream>
#include<cmath>
using namespace std; #define PI 3.1415926 //3.141592654就WA int main()
{
int T,t=0,year;
double x,y,d,s; cin>>T;
while(T--)
{
cin>>x>>y;
d=x*x+y*y; //半径的平方
s=0.5*PI*d; //半圆的面积
year=ceil(s/50.0); //向上取整
cout<<"Property "<<++t<<": This property will begin eroding in year "<<year<<".\n";
if(T==0)
cout<<"END OF OUTPUT."<<endl;
}
return 0;
}

版权声明:本文博主原创文章。博客,未经同意不得转载。

HDU ACM 1065 I Think I Need a Houseboat的更多相关文章

  1. hdu acm 1028 数字拆分Ignatius and the Princess III

    Ignatius and the Princess III Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K ...

  2. HDU ACM 1051/ POJ 1065 Wooden Sticks

    Wooden Sticks Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Tot ...

  3. HDU ACM 题目分类

    模拟题, 枚举1002 1004 1013 1015 1017 1020 1022 1029 1031 1033 1034 1035 1036 1037 1039 1042 1047 1048 104 ...

  4. hdu acm 1166 敌兵布阵 (线段树)

    敌兵布阵 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submi ...

  5. hdu acm 2082 找单词

    找单词 Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submiss ...

  6. HDU ACM 1325 / POJ 1308 Is It A Tree?

    Is It A Tree? Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Tot ...

  7. HDU ACM 1134 Game of Connections / 1130 How Many Trees?(卡特兰数)

    [题目链接]http://acm.hdu.edu.cn/showproblem.php?pid=1134 [解题背景]这题不会做,自己推公式推了一段时间,将n=3和n=4的情况列出来了,只发现第n项与 ...

  8. HDU ACM Eight

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1043 解题背景: 看到八数码问题,没有任何的想法,偶然在翻看以前做的题的时候发现解决过类似的一道题,不 ...

  9. HDU ACM 1690 Bus System (SPFA)

    Bus System Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total ...

随机推荐

  1. VBoxGuestAdditions.iso下载地址

    http://download.virtualbox.org/virtualbox/4.1.2/VBoxGuestAdditions_4.1.2.iso 其它版本号可依次判断..

  2. oracle的to_char中的fm

    SQL> select '|'||to_char(5,'999')||'|' from dual;  结果为:|   5| SQL> select '|'||to_char(5,'000' ...

  3. Java调用摄像头截图

    使用webcam-capture替换JMF调用摄像头 最近有个需要通过java调用摄像头,并截图的需求,在网上找了下资料,大部分是用一个叫jmf的库,但是jmf已经几百年没有更新,用起来各种问题.后来 ...

  4. Linux下hp打印机驱动hplip分析

    Hplip分析 版本号是2.14,源代码位置:http://hplipopensource.com. 图的来源:http://hplipopensource.com/node/128. 实践中使用的打 ...

  5. NVL NVL2 NVLIF

    ========Oracle=======NVL (expr1, expr2)->expr1为NULL,返回expr2:不为NULL,返回expr1.注意两者的类型要一致

  6. 一般报java.lang.NullPointerException的原因有以下几种

    一般报java.lang.NullPointerException的原因有以下几种: ·字符串变量未初始化: ·接口类型的对象没有用具体的类初始化,比如: List lt; 会报错 List lt = ...

  7. 解决错误 fatal error C1010: unexpected end of file while looking for precompiled head

    在编译VS时候,出现fatal error C1010: unexpected end of file while looking for precompiled head. 问题详解:致命错误C10 ...

  8. android ksoap2调用.net Webservice 方法总结

    android  ksoap2调用.net Webservice 方法直接放到一个类里: package com.util; import org.ksoap2.SoapEnvelope; impor ...

  9. Windows7在自由的虚拟机(微软官方虚拟机)

    Windows7在自由的虚拟机(微软官方虚拟机) 前言: 不是说windows7自带的虚拟机最好用,但他的正式版.免费.只是希望你能windows7用户.它将能够自由使用: 还是Vmware. 微软为 ...

  10. ubuntu10.10和windows双系统启动顺序的修改

    我想大部分童鞋装ubuntu的时候,硬盘上的windows肯定还是保留着的,启动电 脑时可以选择,想进windows就进windows,想进ubuntu就进ubuntu.但装完ubuntu后,它默认启 ...