POJ - I Think I Need a Houseboat

百炼1005:I Think I Need a Houseboat 描述 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 squ... 阅读详情

I Think I Need a Houseboat

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.
#include <stdio.h>
#include <math.h>
#define PI 3.1415926
int main()
{
	int n,sign = 1;
	double x,y,r;
	scanf("%d",&n);
	while(n--)
	{
		scanf("%lf%lf",&x,&y);
	    r = sqrt(x*x+y*y);
		printf("Property %d: This property will begin eroding in year %d.\n",sign++,(int)((PI*r*r)/100)+1);
	}
	printf("END OF OUTPUT.\n");
	return 0;
}

 

北大百炼1005 I Think I Need a Houseboat题解 1005:I Think I Need a Houseboat 总时间限制: 1000ms 内存限制: 65536kB 描述Fred Mapper is considering purchasing some land in Louisiana to build his house on. In the process of investigating the la 阅读详情

相关推荐

【poj1005】I Think I Need a Houseboat 题解&代码(c++)

poj,二分

曾经追梦的happy时光 1214

英语题翻译20

I Think I Need a Houseboat | JXNUOJ 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, du

zanhhhhhh的博客 273

Kylin-Desktop-V10-SP1-General-Release-2303-X86_64-海光版(hygon c86)安装与配置指南

本文提供了在国产海光C86处理器平台上安装与配置Kylin Desktop V10 SP1操作系统的详细指南。内容涵盖从下载专用镜像、制作启动盘、BIOS关键设置、磁盘分区方案,到系统安装后的驱动优化、必备软件安装及常见故障排除,旨在帮助用户顺利完成hygon c86平台的系统部署与优化。

tree的博客 1430

【百练】我想我需要一艘船屋(I Think I Need a Houseboat)

描述 弗雷德·马珀(Fred Mapper)正在考虑在路易斯安那州购买一些土地来建造他的房子。在调查土地的过程中,他了解到,由于密西西比河造成的侵蚀,路易斯安那州实际上每年萎缩50平方英里。由于弗雷德希望在他的余生中住在这所房子里,他需要知道他的土地是否会因侵蚀而失去。 在做了更多的研究之后,弗雷德了解到正在失去的土地形成了一个半圆。此半圆是以 (0,0) 为中心的圆的一部分,将圆一分为二的线是 X 轴。X 轴以下的位置位于水中。半圆在第1年初的面积为0。(图中所示为半圆。 输入 输入的第一行将是一个正整数

qq_63683485的博客 582

fpga在线升级 linux_仅5000行Verilog代码、可在FPGA上跑轻量级Linux系统的RISC-V内核

本文发布于www.hackster.io,由东京理工大学的计算机学院开发,专用于教学与加速用(苏老师也一直认为这是RISC-V当前的主要方向)。目前市场上开源的RISC-V内核已经很多,但很少有公开的RISC-V计算系统是非常轻型且能跑Linux系统的。这一款RISC-V内核就可以运行在FPGA上,用Verilog编写的,需要很少硬件的资源就能跑起来,所以可以运行在一个低成本的FPGA上。来看一下...

weixin_34083807的博客 1881

阻抗匹配详解

在深入理解阻抗匹配概念之前,我们可以先来一起看一个现象,首先使用一个信号发生器输出一个脉宽为 50ns 的单脉冲信号,同时将信号接入示波器,此时在示波器的波形视图上可以看到这个仅有一个脉冲的信号,如下图。如果我们将信号接入示波器的同时将电缆延长数米到外部,并且延长后电缆末端保持悬空不接入任何东西,引出一段未接入任何东西的开路电缆,按照常识应该没有任何影响,然而实测是在原有脉冲旁边多出了一个类似脉冲,如下图。

zhbi98 的技术 Blogs 2583

I Think I Need a Houseboat(POJ--1005;OJ--2434

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

zhang_di233的专栏 399

FPGA+滨淞CCD实战:手把手教你搭建S7031/S10142成像电路(附避坑指南)

本文详细介绍了使用FPGA驱动滨淞CCD传感器(S7031/S10142)构建高精度成像系统的完整实战流程。内容涵盖核心器件选型、系统架构规划、电路板(焦面板与接口板)设计要点、FPGA Verilog逻辑实现,并提供了从电源管理、信号调理到数据采集的详细避坑指南,帮助读者从零搭建稳定可靠的成像电路。

weixin_29271263的博客 247

POJ 1005 I Think I Need a Houseboat [解题报告] Java

http://www.acmerblog.com/POJ-1005-I-Think-I-Need-a-Houseboat-blog-214.html

expleeve 1040

架构师成长之路(1)--什么是架构师

前言: 哲学家常思考的问题:" 我是谁?"" 我从哪里来?"" 要到哪里去?不只是哲学家,我想每个人都有自己对这三个问题的认知。 如果我们要成为架构师,我们自己要面临的三大问题: 找准自己定位:我是谁?在哪里? 怎样做好架构师:我要做什么? 如何搭建架构师知识体系:我该怎么做? 这里面就是做事方法论:目标(我要做什么),方法(计划)(我该怎么做), 执行/行动找准自己定位:我是谁?在哪里...

黄规速博客:学如逆水行舟,不进则退 6万+

包络检波电路(Envelope Detector)

把 100 kHz 载波想象成"电台的高频信号",把 1 kHz 包络想象成"主持人说话的声波"。而今天电路的工作,就是把这个"调大调小的外壳"(包络)重新剥出来,还原成主持人的声音 🎵。这是三极管开关电路的重要搭档,也是从"二极管家族"过渡到"三极管家族"的桥梁 🔌。——倍压整流看的是"幅值累积"(多个电容接力),包络检波看的是"频率分离"(高低频分开)。同样的"D1 串联 + RC 并联"拓扑,今天被赋予了"AM 解调"的新生命。——电感负载的"泄洪闸",保护三极管开关不被反向电动势击穿。

飞多学堂的博客 129

POJ 1005 I Think I Need a Houseboat - 强制类型转换

POJ 1005 I Think I Need a Houseboat 题目本意是:计算半圆面积序列对应的半径。难度:1星。 /* * POJ 1005 I Think I Need a Houseboat * 简单的计算题,只需注意端点值; * * 用了强制类型转换; * */ #include using namespace std; #define PI 3.1415

ChenK在学习! 799

Vue - 解决报错 Error: Cannot find module ‘XXX\@vue\cli-service\bin\vue-cli-service.js‘(vue项目编译运行出错,启动失败)

vue报错,Error: Cannot find module ‘@vue\cli-service\bin\vue-cli-service.js‘,vue2项目启动报错,vue3项目运行出错,vue执行npm run serve报错,找不到@vue/cli-service模块,vue项目关于:Error: Cannot find module ‘D:\@vue\cli-service\bin\vue-cli-service.js‘的解决方案,vue项目跑不起来了,Vue项目报错,跑项目报错Cannot fi

🏆 前端领域优质创作者 3124

poj 1005 I Think I Need a Houseboat

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

qq_43734686的博客 203

HQChart实战教程64-自定义分时图标题栏

分时图标题栏显示的是当前十字光标所在位置的分钟信息,显示在分时图窗口顶部。一般会显示品种的名称,日期,时间,价格,均价 涨幅,成交量,金额等等,hqchart内置会显示这些信息。如果要额外显示其他的字段,就需要通过替换格式化标题输出函数来是现实。我们在hqchart实例创建完成以后,通过OnCreatedCallback回调函数替换自己的格式化输出函数。返回 { AryText:[ { Text:文字, Color:颜色},…入参 data={ Data: 当前十字光标所在位置的分钟线 }

小银 1071

pscad IEEE标准系统搭建说明

pscad IEEE标准系统搭建说明,包含典型的IEEE 9节点、14节点、30节点、39节点和118节点系统。内含标准测试系统的原始数据和潮流结果。

POJ 1005 I Think I Need a Houseboat

POJ 1005 I Think I Need a Houseboat Time Limit:1000MS Memory Limit:10000K Total Submissions:114666 Accepted:49465 Description Fred Mapper is considering purchasing ...

weixin_30410119的博客 159

vb 6.0并口开发操作实例

vb6并口开发,简体中文,试例内有inpout32.dll动态链接库

POJ-I Think I Need a Houseboat

I Think I Need a Houseboat Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 105582 Accepted: 45989 Description Fred Mapper is considering purchasing some land in Louisiana to build h

qq_35786972的博客 303

STM32F407中文手册

STM32f407中文手册 本参考手册面向应用开发人员,提供有关使用 STM32F405xx/07xx、STM32F415xx/17xx、 STM32F42xxx 和 STM32F43xxx 微控制器存储器与外设的完整信息。STM32F405xx/07xx、STM32F415xx/17xx、STM32F42xxx 和 STM32F43xxx 构成一个微 控制器系列,各产品具有不同的存储器大小、封装和外设。有关订购信息以及器件的机械与电气特性,请参见数据手册。有关 ARM Cortex™-M4F 内核的信息,请参见《Cortex™-M4F 技术参考手册》。

jdk-8u144-linux-x64.tar.gz.

该资源为搭建Linux系统Java环境用,资源的后缀为tar.gz格式的压缩包

poj1005 -- I Think I Need a Houseboat

I Think I Need a Houseboat Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 103343   Accepted: 44962 Description Fred Mapper is considering purchasing som

BestFSQ的博客 751

poj1005 I Think I Need a Houseboat

I Think I Need a Houseboat Time Limit:1000MS Memory Limit:10000K Total Submissions:115105 Accepted:49629 Description Fred Mapper is considering purchasing some land in Louisia...

NoahCool 333

poj1005——I Think I Need a Houseboat

基本思路: Fred Mapper的家(X,Y)到侵蚀中心(0,0)的距离就是侵蚀半径R 那么Area = 1/2*pi*R 就是侵蚀到Fred Mapper家时的侵蚀面积 而侵蚀速度为每年50 那么侵蚀到Fred Mapper家需要 RestYear = Area/50 = pi*R/100 年 又要求从第一年开始计算,最后一年不够一年按一年计算,那

Summer的Blog 984

【POJ】1005 I Think I Need a Houseboat

I Think I Need a Houseboat Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 65490   Accepted: 27502 Description Fred Mapper is considering purchasing some l

Manjushri的知识库 654

POJ 1005 - I Think I Need a Houseboat

Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 84134   Accepted: 36425 Description Fred Mapper is considering purchasing some land in Louisiana to build his house on

Latte_z的小站 493

POJ1005-I Think I Need a Houseboat

全解题报告索引目录 -> 【北大ACM – POJ试题分类】 转载请注明出处:http://exp-blog.com ------------------------------------------------------------------------- 问题描述: Fred Mapper 正在考虑在路易斯安那州购买一些土地来建他自己的房子。在研究土地的过程中,...

ζёСяêτ - 小優YoU 8772

poj 1005 I Think I Need a Houseboat

poj 1005  I Think I Need a Houseboat                  题目链接:http://poj.org/problem?id=1005 题目大意:半圆表示一块面积可扩展的区域,开始时,面积是0,在(0,0)处开始以每年50平方米的速度同样呈半圆扩展,输入一个正整数N,然后输入N对坐标,对于每一对坐标值:求出面积扩展到该点的年数,坐标值单位为米。 题目

slicer的技术交流栈 1048
上一篇: POJ - Financial Management
下一篇: POJ - DNA Sorting
SevenMIT
博客等级 码龄15年 60粉丝 162原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址