I Think I Need a Houseboat

思路:距离问题,一道水题

代码:

#include <iostream>
#include <cmath>
using namespace std;
#define PI 3.1415
int main()
{
int k, a = 1, year;
double s, x, y;
cin >> k;
while (k--)
{
cin >> x >> y;
s = (PI / 2)*(x*x + y*y);
year = s / (double)50 + 1;
cout << "Property " << a++ << ": This property will begin eroding in year " << year << "." << endl;
}
cout << "END OF OUTPUT." << endl; system("pause");
return 0;
}

POJ I Think I Need a Houseboat的更多相关文章

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

  2. I Think I Need a Houseboat POJ - 1005

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

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

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

  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. I Think I Need a Houseboat 分类: POJ 2015-06-11 17:52 12人阅读 评论(0) 收藏

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

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

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

  8. poj 1005 I Think I Need a Houseboat

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

  9. I Think I Need a Houseboat POJ - 1005(数学)

    题目大意 在二维坐标内选定一个点,问你当洪水以半圆形扩散且每年扩散50单位,哪一年这个点被被洪水侵蚀? 解法 代码 #include <iostream> #include <cst ...

  10. POJ题目排序的Java程序

    POJ 排序的思想就是根据选取范围的题目的totalSubmittedNumber和totalAcceptedNumber计算一个avgAcceptRate. 每一道题都有一个value,value ...

随机推荐

  1. 在 Windows 上使用VirtualBox 安装 Ubuntu

    一.VirtualBox虚拟机软件 之前使用过VMWare,这是第一次尝试使用VirtualBox,记录一下~ 我们可以从官网下载VirtualBox,地址:https://www.virtualbo ...

  2. synchronized与CAS

    参考:java3y<对线面试官> synchronized synchronized是⼀种互斥锁,⼀次只能允许⼀个线程进⼊被锁住的代码块synchronized是Java的⼀个关键字,它能 ...

  3. C++快速求解最大公因数 | gcd库函数

    1.介绍 gcd全称 :greatest common divisor 使用 __gcd( int x1, int x2 ) 函数可以高效.迅速得到x1, x2两个数的最大公因数.省去手写底层代码,专 ...

  4. allure环境配置生成测试报告

    一.pycharm中安装下载allure:pip install allure-pytest.或者设置里面添加allure-pytest搜索安装 二.电脑中配置allure系统环境变量: allure ...

  5. Mybatis插件-分批次插入数据

    背景 有时候使用insert into xxx values (),()语句插入大量数据时,会使得SQL语句超长,为了解决这个问题,在Mybatis中编写一个分批次插入的插件. 实现 package ...

  6. 【NPDP专项练习】第六章 市场研究

    第六章 市场研究 1.VOC也叫客户心声,指的是. A 选择一个单一的投资组合项目,并保证所有项目都在策略内 B 利用迭代在专家组中形成共识的决策 C 通过人工"商店"引导潜在客户 ...

  7. BIP弹框内容显示的隐藏

    viewModel.on("customInit", function (data) {         // 关闭或取消关原因详情--页面初始化         viewMode ...

  8. win的安全更新安装不成功,可用下面命令进行强制更新

  9. wake on lan sender 2.0.8

    局域网 远程关机

  10. AVL tree rotate

    AVL tree single rotate /** * Rotate binary tree node with left child. * For AVL trees, this is a sin ...