Time Limit:1000MS     Memory Limit:10000KB     64bit IO Format:%I64d
& %I64u

Description

Fred Mapper is considering purchasing some land in Louisiana to build his house on. In the process of investigating the land, he learned that the state of Louisiana is actually shrinking by 50 square miles each year, due to erosion caused by the Mississippi
River. Since Fred is hoping to live in this house the rest of his life, he needs to know if his land is going to be lost to erosion. 



After doing more research, Fred has learned that the land that is being lost forms a semicircle. This semicircle is part of a circle centered at (0,0), with the line that bisects the circle being the X axis. Locations below the X axis are in the water. The
semicircle has an area of 0 at the beginning of year 1. (Semicircle illustrated in the Figure.)

Input

The first line of input will be a positive integer indicating how many data sets will be included (N). Each of the next N lines will contain the X and Y Cartesian coordinates of the land Fred is considering. These will be floating point numbers measured in
miles. The Y coordinate will be non-negative. (0,0) will not be given.

Output

For each data set, a single line of output should appear. This line should take the form of: “Property N: This property will begin eroding in year Z.” Where N is the data set (counting from 1), and Z is the first year (start from 1) this property will be within
the semicircle AT THE END OF YEAR Z. Z must be an integer. After the last data set, this should print out “END OF OUTPUT.”

Sample Input

2
1.0 1.0
25.0 0.0

Sample Output

Property 1: This property will begin eroding in year 1.
Property 2: This property will begin eroding in year 20.
END OF OUTPUT.

Hint

1.No property will appear exactly on the semicircle boundary: it will either be inside or outside. 

2.This problem will be judged automatically. Your answer must match exactly, including the capitalization, punctuation, and white-space. This includes the periods at the ends of the lines. 

3.All locations are given in miles.
#include <iostream>
#include<cmath>
using namespace std;
double PI=3.14 ;
int main()
{
int n,s;
double x,y;
cin>>n;
for(int i=1;i<=n;i++)
{
cin>>x>>y;
x = (x*x + y*y)* PI / 2 / 50;
s=x;
if(x-s>0)
s++; printf("Property %d: This property will begin eroding in year %d.\n", i, s); }
printf("END OF OUTPUT.\n");
return 0;}

D - I Think I Need a Houseboat(1.3.1)的更多相关文章

  1. poj 1005:I Think I Need a Houseboat(水题,模拟)

    I Think I Need a Houseboat Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 85149   Acce ...

  2. 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 ...

  3. [POJ] #1005# I Think I Need a Houseboat : 浮点数运算

    一. 题目 I Think I Need a Houseboat Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 97512 ...

  4. 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 ...

  5. 每天一道算法_6_I Think I Need a Houseboat

    今天的题目是I Think I Need a Houseboat 如下: Description Fred Mapper is considering purchasing some land in ...

  6. I Think I Need a Houseboat

    I Think I Need a Houseboat Time Limit : 2000/1000ms (Java/Other)   Memory Limit : 65536/32768K (Java ...

  7. 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 ...

  8. I Think I Need a Houseboat POJ - 1005

    I Think I Need a Houseboat POJ - 1005 解题思路:水题 #include <iostream> #include <cstdio> #inc ...

  9. HDU1065 I Think I Need a Houseboat 2016-07-24 13:59 101人阅读 评论(0) 收藏

    I Think I Need a Houseboat Problem Description Fred Mapper is considering purchasing some land in Lo ...

  10. POJ. 1005 I Think I Need a Houseboat(水 )

    POJ. 1005 I Think I Need a Houseboat(水 ) 代码总览 #include <cstdio> #include <cstring> #incl ...

随机推荐

  1. 解决Linux中文显示乱码的问题

    1.直接执行 export LC_ALL=zh_CN.UTF8 #linux服务器中文显示乱码,但配置文件设置是中文的.解决办法 2.修改文件 修改/etc/sysconfig/i18n文件,确认信息 ...

  2. 使用scss + react + webpack + es6实现幻灯片

    写在前面: 刚学习完慕课网里的一个幻灯片案例,自己加了刚学的react,两者结合.首先让大家看看效果 点击此处 你可以先用纯js实现上面的效果:我的github上的 JS代码 或者 观看慕课提供的课程 ...

  3. Kylin使用笔记-0: kylin介绍

    APACHE KYLIN™ 概览 Apache Kylin™是一个开源的分布式分析引擎,提供Hadoop之上的SQL查询接口及多维分析(OLAP)能力以支持超大规模数据,最初由eBay Inc. 开发 ...

  4. Django实战(18):提交订单

    前面的内容已经基本上涵盖了Django开发的主要方面,我们从需求和界面设计出发,创建模型和修改模型,并通过scaffold作为开发的起点:在scaffold的基础上重新定制模板,并且通过Model类和 ...

  5. 三 oracle 用户管理一

    一.创建用户概述:在oracle中要创建一个新的用户使用create user语句,一般是具有dba(数据库管理员)的权限才能使用.create user 用户名 identified by 密码; ...

  6. poj2524 Ubiquitous Religions(并查集)

    题目链接 http://poj.org/problem?id=2524 题意 有n个学生,编号1~n,每个学生最多有1个宗教信仰,输入m组数据,每组数据包含a.b,表示同学a和同学b有相同的信仰,求在 ...

  7. redis在Linux下的远程连接

    1.redis在Linux下的远程连接: $ redis-cli -h host -p port -a password 如何连接到主机为 127.0.0.1,端口为 6379 ,密码为 mypass ...

  8. HDU - 1754 A - I Hate It 线段树

    I Hate It Time Limit: 9000/3000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total S ...

  9. C# 操作 access 数据库

    随笔: (1)   命名空间 using System.Data.OleDb; (2)   连接字符串 private staticstring connStr = @"Provider= ...

  10. 使用Python发送HTML格式的邮件(收到的邮件有发送方才是正解)

    发送html格式的和普通文本格式差不多,只是MIMEText(content,"html","utf-8"))与MIMEText(content,"p ...