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 ...
随机推荐
- HI3531串口测试程序(arm)
#include<stdio.h> unsigned int UART0_ADDR = 0x20080000; unsigned int retu=0; int i=0; void del ...
- FAT32文件系统的存储组织结构(一)
对磁盘的物理结构,逻辑结构和存储结构有了比较深入的了解后,我们来仔细探讨FAT32文件系统的存储组织结构.说到文件系统的组织结构,我们应该马上意识到,这指的是文件系统在同一个分区内的组织结构,在这个话 ...
- 使用WebApiClient请求和管理Restful Api
前言 本篇文章的内容是WebApiClient应用说明篇,如果你没有了解过WebApiClient,可以先阅读以下相关文章: WebApi client 的面向切面编程 我来给.Net设计一款Http ...
- iBatis基础知识
iBatis简介: 特点:结构性好,小巧,容易上手 搭建环境: 1.创建java 项目 2.导入(3个)jar包:ibatis-2.3.0.667.jar,mysql驱动包,Junit测试包 3.配置 ...
- java 的几种引用
从JDK1.2版本开始,把对象的引用分为四种级别,从而使程序能更加灵活的控制对象的生命周期.这四种级别由高到低依次为:强引用.软引用.弱引用和虚引用. 1.强引用 本章前文介绍的引用实际上都是强引用, ...
- jquery的各种插件调用(有些已经过时,以备注,其他的一些可以闲的时候用作拆解)
jquery的valiteDate验证插件应用 <!DOCTYPE html> <html> < head> < meta ...
- Jmeter_从jdbc请求的响应中获取参数做关联
在之前的文章-参数关联中,留个一个小尾巴,这里补充一下 http://www.cnblogs.com/Zfc-Cjk/p/8295495.html 1:从sql表中将需要取的数据查出来 2:我们需要把 ...
- luogu1402 酒店之王
题目描述 XX酒店的老板想成为酒店之王,本着这种希望,第一步要将酒店变得人性化.由于很多来住店的旅客有自己喜好的房间色调.阳光等,也有自己所爱的菜,但是该酒店只有p间房间,一天只有固定的q道不同的菜. ...
- Java 多线程异步处理demo
java中实现多线程 1)继承Thread,重写里面的run方法 2)实现runnable接口通过源码发现:第一种方法说是继承Tread然后重写run方法,通过查看run方法的源码,发现run方法里面 ...
- 踩坑の SpringMVC文件上传
环境准备 添加两个jar包 commons-fileupload-1.2.2.jar commons-io-2.4.jar 配置要求 在springmvc.xml中配置multipart类型解 ...