I - 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 - I Think I Need a Houseboat
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.

题目大意:给定x和y的值作为一个圆的圆心坐标,若海岸线以每年50的速度被侵蚀,其为半圆,求出当侵蚀到这个点时是第几年。

解题思路;:数学题,不解释

代码:


#include<stdio.h>
#include<math.h>
const double pi=acos(-1.0);
int main()
{
	double x,y;
	int i,n,k;
	   scanf("%d",&n);
		for(i=1;i<=n;i++)
		{
		scanf("%lf%lf",&x,&y);
            k=ceil(((x*x+y*y)*pi)/100)//向上取整
printf("Property %d: This property will begin eroding in year %d.\n",i,k);
		}
		printf("END OF OUTPUT.");
		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时光 1210

【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

POJ1005-I Think I Need a Houseboat

北大POJ1005-I Think I Need a Houseboat 解题报告+AC代码

c语言练习:POJ 1005 我想我需要一艘船屋(I Think I Need a Houseboat)

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

m0_63002183的博客 1006

Modbus 通信协议详解

Modbus是由 Modicon(现为施耐德电气公司的一个品牌)在 1979 年发明的,是全球第一个真正用于工业现场的总线协议。ModBus网络是一个工业通信系统,由带智能终端的可编程序控制器和计算机通过公用线路或局部专用线路连接而成。其系统结构既包括硬件、亦包括软件。它可应用于各种数据采集和过程监控。为更好地普及和推动Modbus在基于以太网上的分布式应用,目前施耐德公司已将Modbus协议的所有权移交给 IDA(,分布式自动化接口)组织,并成立了 Modbus-IDA 组织。

Projectsauron 的博客 7万+

【C#】控制设备管理器中设备的启用/禁用_20220506

通过C#代码实现设备管理器的启用/停止 引入Manamger程序集,查找到所需设备,控制启停

weixin_45475139的博客 4527

poj1005 I Think I Need a Houseboat 水题

poj1005 I Think I Need a Houseboat 题意:FM正在考虑在路易斯安那州购买一些土地来建他自己的房子,但他发现密西西比河岸某处陆地因为河水侵蚀,每年陆地面积都在减少,每年减少50平方英里,减少的陆地面积呈半圆形,即该半圆形面积以每年50平方英里的速度增长。

Lxp的博客 610

GPS数据处理必备:IGS精密星历下载与使用全攻略(附武汉大学/CDDIS/CODE/GFZ地址)

本文为GPS/GNSS数据处理者提供了IGS精密星历的完整下载与使用指南。详细解析了最终、快速、超快速三种精密星历产品的区别与选择策略,并手把手教学如何从武汉大学、CDDIS、CODE、GFZ四大主流数据中心高效获取数据,涵盖文件命名规则解析及自动化下载脚本,助力科研与工程应用。

weixin_29234239的博客 678

北大ACM 1005题—I Think I Need a Houseboat

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

weixin_30906185的博客 337

三维重建之条纹投影结构光(三)——相位展开优化与多频外差实践

本文深入探讨了三维重建中条纹投影结构光技术的核心环节——相位展开优化。针对传统路径跟踪法存在的误差传播与路径依赖问题,重点解析了多频外差法的原理与优势,并通过详细的C++代码实践,展示了如何利用三频外差法实现鲁棒、高精度的相位展开,从而获得连续的绝对相位图,为后续三维点云生成奠定坚实基础。

weixin_29074295的博客 529

Vivado里LDPC IP核怎么配?手把手教你从6144bit数据到完整参数设置

本文详细介绍了在Vivado中配置LDPC IP核的完整流程,从6144bit数据的参数计算到实际IP核设置。通过分析基本图选择、扩展因子计算和移位参数确定等关键步骤,帮助工程师高效完成LDPC编译码的硬件实现,并提供了时序控制、仿真验证和性能优化的实用技巧。

weixin_30352645的博客 517

英语题翻译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的博客 272

即插即用系列(代码实践) | CVPR 2025 FDConv:频域动态卷积,打破密集预测任务的参数效率瓶颈

本文提取自 CVPR 2025 的最新底层算子革新论文《Frequency Dynamic Convolution for Dense Image Prediction》。近年来,动态卷积(Dynamic Convolution)通过融合多个并行卷积核极大地提升了模型性能,但研究表明:这些并行卷积核在频域上的响应高度相似,导致了极其严重的参数浪费,且缺乏对不同频率特征的自适应能力。本文复现了该网络的核心架构——FDConv(频率动态卷积)。该方案创造性地在傅里叶域(Fourier Domain)中学习固定参

分享顶会顶刊论文即插即用模块 110

POJ 1005 题的分析

题目:密西西比河岸某处陆地因为河水侵蚀,每年陆地面积都在减少,每年减少50平方英里,减少的陆地面积呈半圆形,即该半圆形面积以每年50平方英里的速度增长。在第一年初时,该半圆形面积为0,半圆形的圆心坐标为(0,0),现在的任务是给定一个坐标,求出该坐标在哪一年年底会被河水侵蚀。假设给定的坐标到圆心的距离不会等于半圆的半径。 输入:第一行输入坐标个数,第二行开始输入坐标,每个坐标占一行,每个坐标由横

小冰球 543

使用YOLOv5进行工业检测(如裂纹、划痕、破损等)

本文将详细介绍如何使用YOLOv5实现工业检测项目,以检测生产线上的缺陷产品,如裂纹、划痕、破损等。我们将分步介绍数据准备、模型训练、模型优化和部署等过程。

a871923942的博客 2528

AI应用架构师:用RAG解决大模型“幻觉”问题的客服架构设计

在当今的智能客服领域,大语言模型(LLM)凭借流畅的对话能力和强大的理解能力,逐渐取代传统规则式机器人,成为客服系统的核心。但随之而来的“幻觉”问题(即模型编造不存在的信息)却成了致命伤:比如客户问“你们的产品保修期多久”,AI客服可能会自信地回答“3年”,而实际保修期只有1年——这种错误不仅会误导客户,还可能引发投诉、退货甚至法律风险。

AI天才研究院 915

poj 1005

poj 1005 1.题目链接:poj 1005 2.题目解析: 题目告诉我们有一块半圆土地,以每年50个单位消失,问几年后开始完全消失 题目给出坐标,以次我们可以计算出半径,进而计算出这块土地的面积 根据题意,可得到公式:年数 = ½ πr² / 50 + 1(年数要取整,故加1) 3.代码示例 #include &amp;lt;stdio.h&amp;gt; #define PI 3.141592654 ...

Ich/liebe/dich的编程せかい 450

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

poj 1005(水题)

#include<iostream> #include<cmath> using namespace std; int main() { int n; cin >> n; int i,k = 1; while (n--) { float x, y; cin >> x >>...

Algcc的博客 304

NTscan扫描工具

ntscan是一个扫描器,可以扫描没有密码和弱密码的共享,先到配置文件中填写猜测的用户名和密码,扫描过程中右侧出现的是扫描日志。

霍尼韦尔SoftMaster使用说明

霍尼韦尔SoftMaster使用说明

I Think I Need a Houseboat(poj 1005)

1 问题描述 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 actuall

笨蛋9的博客 314

ssm框架搭建

这个是一个在idea上成功跑起来的ssm框架项目,保存在这里方便以后使用直接下载

第三部分:POJ 1005 解题报告

POJ 1005 I Think I Need a Houseboat 【问题描述】 已知有一个圆心为(0,0),半径随时间增长的位于X轴上方的半圆,初始面积为0,每年的面积增加50,给出一个坐标,求该坐标在第几年被该半圆覆盖。

qq_40956679的博客 366

POJ——1005(I Think I Need a Houseboat)问题

程序代码如下: import java.math.BigDecimal; import java.math.RoundingMode; import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO Auto-generated method stub Scan...

WU2629409421perfect的博客 565

C - I Think I Need a Houseboat

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

xiaosuC的博客 465

1005—I Think I Need a Houseboat

I Think I Need a Houseboat Time Limit:1000MS Memory Limit:10000K Total Submissions:105572 Accepted:45982 Description Fred Mapper is considering purchasing some land in Louisiana t...

weixin_30721899的博客 469

北大OJ_1005题:I Think I Need a Houseboat

#include #include using namespace std; #define PI_VAL 3.1415926535 int main() { int nCaseCount = 0; double xVal = 0.0f; double yVal = 0.0f; cin >> nCaseCount; for ( int i = 0; i < nCaseCount

憧憬,思考,奋斗,飞翔 1279

poj 1005 I Think I Need a Houseboat(简单计算题)

题目链接:http://poj.org/problem?id=1005 题意:密西西比河岸某处陆地因为河水侵蚀,每年陆地面积都在减少,每年减少50平方英里,减少的陆地面积呈半圆形,即该半圆形面积以每年50平方英里的速度增长。在第一年初时,该半圆形面积为0,半圆形的圆心坐标为(0,0),现在的任务是给定一个坐标,求出该坐标在哪一年年底会被河水侵蚀。假设给定的坐标到圆心的距离不会等于半圆的半径。

G++ 400
上一篇: H - Area in Triangle解题报告(熊禾强)
下一篇: J - Transmitters解题报告(熊禾强)
CSUST_ACM
博客等级 码龄15年 42粉丝 127原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值