POJ 1005.I Think I Need a Houseboat
来源:互联网 发布:淘宝可以卖杂货吗 编辑:程序博客网 时间:2024/05/13 20:23
题目:http://icpc.njust.edu.cn/Problem/Pku/1005/
AC代码(C++):
#include <iostream>#include <stdio.h>#include <algorithm>#include <iomanip>#include <string.h>#include <map>#include <math.h>using namespace std;#define PI 3.141592653int main(void) {int n;cin >> n;double* a;double* b;int* m;a = new double[n];b = new double[n];m = new int[n];for (int i = 0; i < n; i++) {cin >> a[i] >> b[i];double l = sqrt(a[i] * a[i] + b[i] * b[i]);double area = l*l*PI / 2;int mm = area / 50;m[i] = mm + 1;}for (int i = 0; i < n; i++) {cout << "Property " << i + 1 << ": This property will begin eroding in year " << m[i] << ".\n";}cout << "END OF OUTPUT.";//system("pause");}
总结:水题
0 0
- POJ - I Think I Need a Houseboat
- POJ-I Think I Need a Houseboat
- 【POJ】1005. I Think I Need a Houseboat
- POJ 1005.I Think I Need a Houseboat
- POJ 1005.I Think I Need a Houseboat
- poj 1005 I Think I Need a Houseboat
- POJ 1005 I Think I Need a Houseboat
- (POJ 1005)I Think I Need a Houseboat
- POJ 1005 解题报告 I Think I Need a Houseboat
- 【POJ】1005 I Think I Need a Houseboat
- POJ 1005I Think I Need a Houseboat
- poj-1005 I Think I Need a Houseboat
- [POJ]1005 I Think I Need a Houseboat
- POJ 1005 I Think I Need a Houseboat
- POJ-1005 I Think I Need a Houseboat解题报告
- poj 1004 I Think I Need a Houseboat
- poj 1005 I Think I Need a Houseboat
- poj 1005 I Think I Need a Houseboat
- B - Timofey and cubes
- Codeforces Round #395 (Div. 2) A,B,C,D 题解
- 蓝桥杯算法训练:回文数位数和
- Windows编程入门-Windows消息
- 用.htaccess设置网页/图片/js/css文件内容缓存
- POJ 1005.I Think I Need a Houseboat
- 转-Redis和Memcache的区别总结
- linux下各类常用make命令解释(make/make clean/make distclean)
- Windows编程入门-Windows消息机制
- PHP获取文件扩展名的4种方法
- ==运算符与equals方法
- Java笔记->LinkedList基本用法
- php获取文件名称和扩展名
- react-native入门之快速入门---返回键实现