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 by 50 square miles each year, due to erosion caus…
I Think I Need a Houseboat Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 85149   Accepted: 36857 Description Fred Mapper is considering purchasing some land in Louisiana to build his house on. In the process of investigating the land,…
I Think I Need a Houseboat Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 92090   Accepted: 40012 Description Fred Mapper is considering purchasing some land in Louisiana to build his house on. In the process of investigating the land,…
一. 题目 I Think I Need a Houseboat Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 97512   Accepted: 42430 Description Fred Mapper is considering purchasing some land in Louisiana to build his house on. In the process of investigating the…
1.链接地址: http://bailian.openjudge.cn/practice/1005/ http://poj.org/problem?id=1005 2.题目: I Think I Need a Houseboat Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 82376   Accepted: 35628 Description Fred Mapper is considering purchasing…
今天的题目是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 m…
I Think I Need a Houseboat Time Limit : 2000/1000ms (Java/Other)   Memory Limit : 65536/32768K (Java/Other) Total Submission(s) : 160   Accepted Submission(s) : 21 Problem Description [img]/data/images/1065-1.gif[/img] Fred Mapper is considering purc…
I Think I Need a Houseboat Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 9530    Accepted Submission(s): 2733 Problem Description Fred Mapper is considering purchasing some land in Louisiana…
I Think I Need a Houseboat POJ - 1005 解题思路:水题 #include <iostream> #include <cstdio> #include <cmath> using namespace std; int main() { int n; double xx,yy; double rr; double area,r; int year; scanf("%d",&n); ;i<n;i++){ s…
I Think I Need a Houseboat Problem 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 mil…
POJ. 1005 I Think I Need a Houseboat(水 ) 代码总览 #include <cstdio> #include <cstring> #include <cmath> #include <queue> #include <stack> #include <vector> #define nmax using namespace std; const double pi = acos(-1); int m…
    I Think I Need a Houseboat Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 81874   Accepted: 35368 Description Fred Mapper is considering purchasing some land in Louisiana to build his house on. In the process of investigating the la…
I Think I Need a Houseboat Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 105186   Accepted: 45827 Description Fred Mapper is considering purchasing some land in Louisiana to build his house on. In the process of investigating the land,…
这道题目说白了是一道平面几何的数学问题,重在理解题目的意思: 题目说,弗雷德想买地盖房养老,但是土地每年会被密西西比河淹掉一部分,而且经调查是以半圆形的方式淹没的,每年淹没50平方英里,以初始水岸线为x轴,平分半圆为y轴,建立如下图的坐标系 问题:给出坐标点(y>0),让你判断在那一年这个坐标点会被淹没. 解决方案:我们可以转换成的数学模型是来比较坐标点到原点的距离与半圆半径的大小即可知道该点是否被淹没,公式如下: 1.由于每年半圆面积增长50平方英里,可得半径递推公式R2=sqrt(100/p…
原题链接 题目大意:Fred想在Louisiana买一套房子,但是堤坝不牢固,每年都要被河水侵蚀50平方英里.题目给出他豪宅的坐标,要求他被迫移民搬迁的年份. 解法:也没什么好说的,先求出两点间的距离,即半径,然后算出面积,在除以每年塌方的面积,向上取整即可. 参考代码: #include <stdio.h> #include <math.h> #define PI 3.14 int main(){ int n=1,N,year; float X,Y,dist,area; scan…
这题目只要读懂了意思就好做了,先求出来(0.0)到(x.y)的距离为r,然后求出来以r为半径的半圆的面积,然后再用这个面积除以50,再向上取整就可以啦. #include <stdio.h> #include <math.h> #include <stdlib.h> #define eps 0.000000001 #define pie 3.1415926 int main(){ int t; double res; double area; double r; dou…
#include <iostream> using namespace std; const double pi = 3.1415926535; int main() { ;; double x,y; cin >> t; while(t--) { ++time; cin >> x >> y; double area = pi*(x*x + y*y); ; cout<<"Property "<<time<<…
Question:http://poj.org/problem?id=1005问题点:计算半圆面积及向上取整. Memory: 256K Time: 0MS Language: C++ Result: Accepted #include <iostream> using namespace std; #define pi 3.1415926 #define Num 200 int main() { int N; ]; cin>>N; ;i<N;i++) { cin>&g…
说是计算几何,其实是一道水题.直接算半圆面积即可. #include <iostream> #include <cstdlib> #include <cstdio> #include <cstring> #include <cctype> #include <numeric> #include <cmath> #include <algorithm> #define PI acos(-1) using name…
又是恶心人的水题 圆周率取3.1415926就啥事没有.. #include <iostream> #include <cstdio> #include <cmath> using namespace std; double a,b; int n; int main() { scanf("%d",&n); ;k<=n;k++) { ;i<=n;i++) { scanf("%lf%lf",&a,&…
These will be floating point numbers:看这句话,就是说数据会是浮点型的, 问题(一)数据定义成double类型就过了 我当时以为定义成float类型就可以了, 因为题上说是float point number,但是定义成float类型的却wrong answer,同学让我改成double类型的,我当时问她依据 她说没有依据,你试试呗,我挺固执地继续从别的地方找错误,没有依据?不可能嘛!最后无奈试了一下果真改了类型就对了, 得出一个教训,题上让用的floatin…
分析:告诉协调的房子,每年(0,0)作为一个半圆区域的中心将被添加50.请教如何多年以来,这家的位置将是半圆内.注意pi必须采取3.1415926管辖权. #include<iostream> #include<cmath> using namespace std; #define PI 3.1415926 //3.141592654就WA int main() { int T,t=0,year; double x,y,d,s; cin>>T; while(T--) {…
题目链接 Problem 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 e…
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…
题意:给你一个半圆,半圆以面积每年增加50平方英里的速度扩张.问(x, y)在多少年后被覆盖. 思路:emmm,其实最开始,还是打表的,因为每一年的半圆的半径可以算出来.啊啊啊啊,其实这个方法是可以的.但是!!!wa了! 为什么?因为  ∏ 只可以取3.1415926  所以一直wa. 然后,看了网上的题解!秒懂!其实面积是等差数列!然后把 ∏ 改了过来,秒ac #include<cstdio> #include<cmath> #define IP acos(-1) int mai…
Time Limit:1000MS     Memory Limit:10000KB     64bit IO Format:%I64d & %I64u Submit Status 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 s…
题目大意 在二维坐标内选定一个点,问你当洪水以半圆形扩散且每年扩散50单位,哪一年这个点被被洪水侵蚀? 解法 代码 #include <iostream> #include <cstdio> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int t,cnt=0; double pi=3.14; cin>>t; while(t--) { double…
盗用的翻译,哈哈哈!白嫖就完事了. 题目: 密西西比河岸某处陆地因为河水侵蚀,每年陆地面积都在减少,每年减少50平方英里,减少的陆地面积呈半圆形,即该半圆形面积以每年50平方英里的速度增长.在第一年初时,该半圆形面积为0,半圆形的圆心坐标为(0,0),现在的任务是给定一个坐标,求出该坐标在哪一年年底会被河水侵蚀.假设给定的坐标到圆心的距离不会等于半圆的半径.输入: 第一行输入坐标个数,第二行开始输入坐标,每个坐标占一行,每个坐标由横坐标和纵坐标组成,坐标值为浮点数,单位为英里.输出: 输出该坐标…
题目链接:http://bailian.openjudge.cn/practice/1005/ 思路 一个半圆面积每年增长50,已知一个点坐标,求第几年点在半圆内. #include <stdio.h> #include <math.h> #define pai 3.1415926 int main() { int n; double x,y; scanf("%d",&n); for(int i=0;i<n;i++) { scanf("%…
I Think I Need a Houseboat Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 99271   Accepted: 43245 Description Fred Mapper is considering purchasing some land in Louisiana to build his house on. In the process of investigating the land,…