HDU ACM 1065 I Think I Need a Houseboat
分析:告诉协调的房子,每年(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的更多相关文章
- 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 ...
- HDU ACM 1051/ POJ 1065 Wooden Sticks
Wooden Sticks Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Tot ...
- HDU ACM 题目分类
模拟题, 枚举1002 1004 1013 1015 1017 1020 1022 1029 1031 1033 1034 1035 1036 1037 1039 1042 1047 1048 104 ...
- hdu acm 1166 敌兵布阵 (线段树)
敌兵布阵 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submi ...
- hdu acm 2082 找单词
找单词 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submiss ...
- 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 ...
- HDU ACM 1134 Game of Connections / 1130 How Many Trees?(卡特兰数)
[题目链接]http://acm.hdu.edu.cn/showproblem.php?pid=1134 [解题背景]这题不会做,自己推公式推了一段时间,将n=3和n=4的情况列出来了,只发现第n项与 ...
- HDU ACM Eight
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1043 解题背景: 看到八数码问题,没有任何的想法,偶然在翻看以前做的题的时候发现解决过类似的一道题,不 ...
- HDU ACM 1690 Bus System (SPFA)
Bus System Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total ...
随机推荐
- PV FV PMT
- VS2010,原来还有这些快捷键,果断记下来!
一直认为VS的快捷键跟eclipse比起来差远了,那些由于不知道还有如此多有效却不知的快捷键阿 1. 检查括号匹配(在左右括号间切换): Ctrl +] 2. 选中从光标起到行首(尾)间的代码: Sh ...
- 測试JSON RPC远程调用(JSONclient)
#include <string> #include <iostream> #include <curl/curl.h> /* 标题:JSonclient Auth ...
- Android:主题(Theme)
1.主题和样式的区别主要区别在 主题不能作用于单个View组建,主题应该对整个应用中的所有Activity起作用或者对指定的Activity起作用. 主题定义的格式应该是改变窗口的外观格式,例如窗口变 ...
- u-boot: Error: Can't overwrite "ethaddr"
When try to execute following command, It reports error as following: --->8--- U-Boot> setenv ...
- ASP.NET WebForm / MVC 源码分析
浏览器 Url:https//localhost:6565/Home/Index ,https//localhost:6565/WebForm1.aspx,请求服务器(构建请求报文,并且将请求报文发送 ...
- WPF命令參数CommandParameter
XAML代码例如以下: <Window x:Class="Demo006.MainWindow" xmlns="http://schemas.microsoft.c ...
- Windows8.1硬盘安装Ubuntu14.04双系统参考教程和多硬盘的注意事项[画画]
硬盘安装.无需光盘.U盘:Win8.1为主,Ubuntu14.04为辅,可将Windows或Ubuntu设置为开机默认启动项.在Ubuntu下可查看.操作Windows系统下的文件:适用于安装和14. ...
- 查看linux系统版本号命令
一.查看内核版本号命令: 1) [root@SOR_SYS ~]# cat /proc/version Linux version 2.6.18-238.el5 (mockbuild@x86-012. ...
- C++输入输出进制、数据宽度与对齐、精度、取整
cout<<setw(4)<<setfill('0')<<a<<endl; ////样例输出 a=41输出 0041 1.数的进制 [转载]未完的c++ ...