poj1005 I Think I Need a Houseboat
这题目只要读懂了意思就好做了,先求出来(0.0)到(x.y)的距离为r,然后求出来以r为半径的半圆的面积,然后再用这个面积除以50,再向上取整就可以啦。
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#define eps 0.000000001
#define pie 3.1415926
int main(){
int t;
double res;
double area;
double r;
double x,y;
int cnt=;
scanf("%d",&t);
while(t--){
scanf("%lf%lf",&x,&y);
r=sqrt( x*x+y*y );
area=(pie*r*r)/;
res=area/50.0;
printf("Property %d: This property will begin eroding in year %d.\n",cnt++,(int)ceil(res));
}
printf("END OF OUTPUT.\n");
return ;
}
poj1005 I Think I Need a Houseboat的更多相关文章
- 【POJ1005】I Think I Need a Houseboat
说是计算几何,其实是一道水题.直接算半圆面积即可. #include <iostream> #include <cstdlib> #include <cstdio> ...
- 北大poj-1005
I Think I Need a Houseboat Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 99271 Acce ...
- poj 1005:I Think I Need a Houseboat(水题,模拟)
I Think I Need a Houseboat Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 85149 Acce ...
- I Think I Need a Houseboat 分类: POJ 2015-06-11 17:52 12人阅读 评论(0) 收藏
I Think I Need a Houseboat Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 92090 Acce ...
- [POJ] #1005# I Think I Need a Houseboat : 浮点数运算
一. 题目 I Think I Need a Houseboat Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 97512 ...
- OpenJudge/Poj 1005 I Think I Need a Houseboat
1.链接地址: http://bailian.openjudge.cn/practice/1005/ http://poj.org/problem?id=1005 2.题目: I Think I Ne ...
- 每天一道算法_6_I Think I Need a Houseboat
今天的题目是I Think I Need a Houseboat 如下: Description Fred Mapper is considering purchasing some land in ...
- I Think I Need a Houseboat
I Think I Need a Houseboat Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java ...
- HDU1065 I Think I Need a Houseboat 【数学递推】
I Think I Need a Houseboat Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Ja ...
随机推荐
- 简单且线程安全的两个单例模式java程序
/***具体说明见 http://www.cnblogs.com/coffee/archive/2011/12/05/inside-java-singleton.html*/ package com. ...
- mat(Eclipse Memory Analyzer tool)之二--heap dump分析
文章中的shallow.retained关键字的说明见:GC是如何回收时的判断依据.shallow size.retained size 在本文中,将介绍MAT(Eclipse Memory Anal ...
- MySQL运算符之 <=>
问题 : 我在看以前的一个开发者的代码时看到 WHERE p.name <=> NULL 在这个查询语句中 <=>符号是什么意思啊?是不是和 =号是一样啊?还是一个语法错误啊? ...
- CentOS修改163源(转载)
From:http://www.linuxidc.com/Linux/2012-08/69043.htm #CentOS-Base.repo其他版本文件在http://mirrors.163.com/ ...
- Yii 框架生成缩略图
控制器 if($model->load(Yii::$app->request->post())) { //原图 $model->img = ...
- SIT和UAT的区别
SIT和UAT有什么区别?谢谢! 系统内部集成测试(System Integration Testing) SIT 用户验收测试(User Acceptance Testing) UAT ...
- 106、抗锯齿方法paint.setAntiAlias(ture);paint.setFilterBitmap(true))
在Android中,目前,我知道有两种出现锯齿的情况. ① 当我们用Canvas绘制位图的时候,如果对位图进行了选择,则位图会出现锯齿. ② 在用View的RotateAnimation做动画时候 ...
- POJ 2396 Budget【网络流】
题意: cas //测试数据组数 n m //行数 列数 a1 a2 ... an //每行的和 b1 b2 ... bn //每列的和 q ...
- SQL 获取各表记录数的最快方法
select distinct o.name,i.rows from sysobjects o,sysindexes i where o.id=i.id and o.Xtype= 'U' and i ...
- 阿里RDS备份恢复
未使用root用户操作: 数据库版本要一致 数据目录:/data/mysqlbak/ 先按阿里给的步骤操作,最后出现一步出现,无法找到back_xxx.conf,但该文件已经存在.解决方法: sudo ...