POJ 1005.I Think I Need a Houseboat
2017-02-03 12:08
417 查看
题目:http://icpc.njust.edu.cn/Problem/Pku/1005/
AC代码(C++):
总结:水题
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.141592653 int 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"); }
总结:水题
相关文章推荐
- OpenJudge/Poj 1005 I Think I Need a Houseboat
- POJ 1005 I Think I Need a Houseboat 水题
- POJ1005,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(水 )
- POJ1005-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 1005 I Think I Need a Houseboat
- poj1005 I Think I Need a Houseboat
- poj-1005-I Think I Need a Houseboat
- POJ 1005 I Think I Need a Houseboat