poj-1005-l tanink i need a houseboat
Description
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
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
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.
输出:输出该坐标会在哪一年年底开始被河水侵蚀。对应每个坐标输出一行,输出结束后输出 “END OF OUTPUT.”
#include<iostream>
using namespace std;
const double pi=3.1415926;
int main()
{
int n;
cin>>n; for(int i=1;i<=n;i++)
{
double len,wid;
double m;
int mm=0;
cin>>len>>wid;
m=pi*(len*len+wid*wid)/2;。//求出整个岛消失的面积
mm=m/50+1; cout<<"Property "<<i<<": This property will begin eroding in year "<<mm<<"."<<endl;
if(i==n)cout<<"END OF OUTPUT."; } return 0;
}
poj-1005-l tanink i need a houseboat的更多相关文章
- POJ. 1005 I Think I Need a Houseboat(水 )
POJ. 1005 I Think I Need a Houseboat(水 ) 代码总览 #include <cstdio> #include <cstring> #incl ...
- 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 ...
- [POJ 1005] I Think I Need a Houseboat C++解题
I Think I Need a Houseboat Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 81874 ...
- poj 1005:I Think I Need a Houseboat(水题,模拟)
I Think I Need a Houseboat Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 85149 Acce ...
- [POJ] #1005# I Think I Need a Houseboat : 浮点数运算
一. 题目 I Think I Need a Houseboat Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 97512 ...
- poj 1005 I Think I Need a Houseboat
#include <iostream> using namespace std; const double pi = 3.1415926535; int main() { ;; doubl ...
- I Think I Need a Houseboat POJ - 1005
I Think I Need a Houseboat POJ - 1005 解题思路:水题 #include <iostream> #include <cstdio> #inc ...
- I Think I Need a Houseboat POJ - 1005(数学)
题目大意 在二维坐标内选定一个点,问你当洪水以半圆形扩散且每年扩散50单位,哪一年这个点被被洪水侵蚀? 解法 代码 #include <iostream> #include <cst ...
- POJ 1005 解题报告
1.题目描述 2.解题思路 好吧,这是个水题,我的目的暂时是把poj第一页刷之,所以水题也写写吧,这个题简单数学常识而已,给定坐标(x,y),易知当圆心为(0,0)时,半圆面积为0.5*PI*(x ...
- 1005 -- I Think I Need a Houseboat
I Think I Need a Houseboat Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 105186 Acc ...
随机推荐
- Shell脚本编程学习入门 02
Shell脚本编程学习入门是本文要介绍的内容,我们可以使用任意一种文字编辑器,比如gedit.kedit.emacs.vi等来编写shell脚本,它必须以如下行开始(必须放在文件的第一行): #! ...
- Java中的字符串拼接
Java中的字符串拼接 1.设计源码 /** * @Title:IndexOf.java * @Package:com.you.freemarker.model * @Description: * @ ...
- “var arr = []; ”和 “var arr = {};” 的区别
1.面试题 var arr = []; var arr = {}; 比较上述代码有什么区别? 2.解析 var arr = [];是一个数组对象 var arr = {} ...
- Linux中挂载Windows共享出来的目录
Windows中1.新建文件夹,创建共享目录 右键文件夹,共享 2.设置访问方式 Everyone,添加确认 Linux-ubuntu中1.安装cifs#sudo apt-get install ci ...
- val(),text(),html()的区别
<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script> ...
- JAVA容器的那些事—集合
1.首先我们先讲下Collection接口 Collection接口:Collection是最基本的集合接口,它是由一个独立元素所组成的序列,这些元素服务一条或多条规则.一个Collection代表一 ...
- java实现中文分词
IK Analyzer是基于lucene实现的分词开源框架 下载路径:http://so.csdn.net/so/search/s.do?q=IKAnalyzer2012.jar&t=doc& ...
- linux三剑客之一grep
正则表达式(Regular Expression) 目录 起源 正则表达式是什么? 两类基本正则表达式 正则表达式元字符 Linux上文本三剑客 小试牛刀 总结 一.起源 正则表达式这个名词,相信 ...
- IT企业如何实现项目管理信息化的目标
随着信息化技术的不断深入,企业管理方式逐渐向信息化管理转变.大部分IT企业也为了适应企业管理方式的变革,开始加强对管理信息化创新方面的建设.而IT企业在实现信息化的进程中,项目管理信息化其实是IT企业 ...
- npm包管理器相关知识
关于npm包安装命令的介绍,如下图: