POJ-1005

原创 2015年07月11日 00:52:13
#include<iostream>
#include<cmath>
//#include<algorithm>
using namespace std;

#define PI 3.1415926

/*
return: years
*/
int recursionFunc(float rCurrent, float xYMin){
	float r;

	if(rCurrent==0){
		r=sqrt(100.0/PI);
	}else{
		r=sqrt(100.0/PI+pow(rCurrent,2));
	}
	
	if(r>xYMin){
		return 1;
	}else{
		return 1+recursionFunc(r, xYMin);
	}
}

int main(int argc, char *argv[]){
	int n;
	float x,y;
	float r;
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>x>>y;
		r=sqrt(pow(x,2)+pow(y,2));

		cout<<"Property "<<i+1<<": This property will begin eroding in year "<<recursionFunc(0,r)<<"."<<endl;
	}

	cout<<"END OF OUTPUT."<<endl;

	return 0;
}



















POJ1005-I Think I Need a Houseboat

  • 2011年07月29日 01:21
  • 21KB
  • 下载

poj 1005 I Think I Need a Houseboat

  • 2009年06月01日 13:31
  • 540B
  • 下载

POJ1005,I Think I Need a Houseboat,数学水题

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

poj-1005-I Think I Need a Houseboat

I Think I Need a Houseboat Time Limit: 1000MS   Memory Limit: 10000K Total Submissio...

poj1005 -- I Think I Need a Houseboat

I Think I Need a Houseboat Time Limit: 1000MS   Memory Limit: 10000K Total Submissio...
  • BestFSQ
  • BestFSQ
  • 2017年04月02日 19:22
  • 154

poj1005(I Think I Need a Houseboat)

I Think I Need a Houseboat Time Limit: 1000MS   Memory Limit: 10000K Total Submissio...

POJ 1005 I Think I Need a Houseboat(水题)

I Think I Need a Houseboat Time Limit: 1000MS   Memory Limit: 10000K Total Submissio...

POJ 1005 I Think I Need a Houseboat 水

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

poj 4604 Deque-----2013多校联合赛第一场--1005

做了一天,终于做出来了。。 结题报告:考虑题目的一个简化版本:使双端队列单调上升。对于序列 A 和队列 Q,找到队列中最早出 现的数字Ax,则Ax将 Q 分成的两个部分分别是原序列中以Ax开始的最长上...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:POJ-1005
举报原因:
原因补充:

(最多只允许输入30个字)