题目大意

在二维坐标内选定一个点,问你当洪水以半圆形扩散且每年扩散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 x,y;
cin>>x>>y;
int t=0.5*pi*(x*x+y*y)/50;
printf("Property %d: This property will begin eroding in year %d.\n",++cnt,t+1);
}
printf("END OF OUTPUT.\n");
}

I Think I Need a Houseboat POJ - 1005(数学)的更多相关文章

  1. I Think I Need a Houseboat POJ - 1005

    I Think I Need a Houseboat POJ - 1005 解题思路:水题 #include <iostream> #include <cstdio> #inc ...

  2. POJ. 1005 I Think I Need a Houseboat(水 )

    POJ. 1005 I Think I Need a Houseboat(水 ) 代码总览 #include <cstdio> #include <cstring> #incl ...

  3. 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 ...

  4. [POJ 1005] I Think I Need a Houseboat C++解题

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

  5. poj 1005:I Think I Need a Houseboat(水题,模拟)

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

  6. [POJ] #1005# I Think I Need a Houseboat : 浮点数运算

    一. 题目 I Think I Need a Houseboat Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 97512 ...

  7. poj 1005 I Think I Need a Houseboat

    #include <iostream> using namespace std; const double pi = 3.1415926535; int main() { ;; doubl ...

  8. POJ 1005 解题报告

    1.题目描述   2.解题思路 好吧,这是个水题,我的目的暂时是把poj第一页刷之,所以水题也写写吧,这个题简单数学常识而已,给定坐标(x,y),易知当圆心为(0,0)时,半圆面积为0.5*PI*(x ...

  9. poj: 1005

    简单题 #include <iostream> #include <stdio.h> #include <string.h> #include <stack& ...

随机推荐

  1. Use of implicitly declared global variable

    https://stackoverflow.com/questions/7604419/resharper-javascript-use-of-implicitly-declared-global-v ...

  2. 【HDU 2157】 How Many Ways??

    [题目链接] 点击打开链接 [算法] 设A[i][j]为走一条边,从i走到j的方案数 C[i][j]为走两条边,从i走到j的方案数,显然有 : C = A * A = A^2 C'[i][j]为走三条 ...

  3. 最长回文子串问题 O(n)算法 manacher URAL1297 HDU3068

    先来看一道简单的题,ural1297 给定一个1000长度的字符串,求最长回文子串. 看起来很Naive,乱搞一下,O(n^2)都可以解决. 再来看这个题 HDU3068 120个110000长度的字 ...

  4. 如何在 ubuntu 12.04 上安装 skype(转载)

    转自:http://blog.51osos.com/linux/how-to-install-skype-in-ubuntu-12-04/ 添加Canonical Partner Repository ...

  5. PCB 机器学习(ML.NET)初体验实现PCB加投率预测

    使用ML.NET建立PCB加投率模型对单一蚀刻工序进行加投率预测, 此实例为最简单预测,要想实现全流程加投率预测挑战难度还是挺大的,可以查看另一种关于大数据在PCB行业应用---加投率计算基本原理:P ...

  6. bzoj 1669: [Usaco2006 Oct]Hungry Cows饥饿的奶牛【dp+树状数组+hash】

    最长上升子序列.虽然数据可以直接n方但是另写了个nlogn的 转移:f[i]=max(f[j]+1)(a[j]<a[i]) O(n^2) #include<iostream> #in ...

  7. Notepad++安装插件

    https://sourceforge.net/projects/npp-plugins/files/ 下载完插件后,通过notepad++的设置>>>>导入>>& ...

  8. O - Combinations (组合数学)

    Description Computing the exact number of ways that N things can be taken M at a time can be a great ...

  9. java 选择排序与冒泡排序

    选择排序与冒泡排序的特点与区别 ++++++++++++++++++++++++++++++++++++++++++++++ 选择排序 这一种简单的排序方法,它的基本思想是:R[n]第一次从R[0]~ ...

  10. [ Nowcoder Contest 167 #C ] 部分和

    \(\\\) \(Description\) 给出一个长度为\(N\)的数组\(A[i]\),保证\(N\)为 \(2\) 的整次幂. 对于每个 \(i\ (i\in [0,N))\)求所有满足\(( ...