POJ 1005 解题报告
1.题目描述
2.解题思路
好吧,这是个水题,我的目的暂时是把poj第一页刷之,所以水题也写写吧,这个题简单数学常识而已,给定坐标(x,y),易知当圆心为(0,0)时,半圆面积为0.5*PI*(x2+y2),每年侵蚀速度为50,直接除掉取余即可。代码如下:
/*author : lipandate : 2013.07.25email : areslipan@163.com*/#include <iostream>#include <vector>#include <iterator>#define PI 3.141592653589793using namespace std;int main(){int count = 0;vector<int> result;cin >> count;float x,y;for(int i = 0;i < count; ++i){cin >> x >>y;result.push_back((int)((x*x+y*y)*PI*0.5)/50+1);}vector<int>::iterator iter;int i = 1;for(iter = result.begin(); iter!= result.end(); ++iter){cout << "Property "<<i<<": This property will begin eroding in year "<<*iter<<"."<<endl;i++;}cout <<"END OF OUTPUT.";}
POJ 1005 解题报告的更多相关文章
- POJ 1001 解题报告 高精度大整数乘法模版
题目是POJ1001 Exponentiation 虽然是小数的幂 最终还是转化为大整数的乘法 这道题要考虑的边界情况比较多 做这道题的时候,我分析了 网上的两个解题报告,发现都有错误,说明OJ对于 ...
- poj分类解题报告索引
图论 图论解题报告索引 DFS poj1321 - 棋盘问题 poj1416 - Shredding Company poj2676 - Sudoku poj2488 - A Knight's Jou ...
- POJ 1003 解题报告
1.问题描述: http://poj.org/problem?id=1003 2.解题思路: 最直观的的想法是看能不能够直接求出一个通项式,然后直接算就好了, 但是这样好水的样子,而且也不知道这个通项 ...
- POJ 1004 解题报告
1.题目描述: http://poj.org/problem?id=1004 2.解题过程 这个题目咋一看很简单,虽然最终要解出来的确也不难,但是还是稍微有些小把戏在里面,其中最大的把戏就是float ...
- Timus 1005 解题报告
题目链接 http://acm.timus.ru/problem.aspx?space=1&num=1005 题目大意 给你一堆石头,现在需要你将这堆石头分成两堆,要求两堆石头的重量相差最小, ...
- POJ 3414 解题报告!
原题: Pots Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 13227 Accepted: 5550 Special Jud ...
- POJ 2411 解题报告
传送门:http://poj.org/problem?id=2411 题目简述 有一个\(W\)行\(H\)列的广场,需要用\(1*2\)小砖铺满,小砖之间互相不能重叠,问 有多少种不同的铺法? 输入 ...
- 广大暑假训练1 E题 Paid Roads(poj 3411) 解题报告
题目链接:http://poj.org/problem?id=3411 题目意思:N个city 由 m 条路连接,对于一条路(假设连接Cityia和 Cityb),如果从Citya 去 Cityb的途 ...
- POJ旅行商问题——解题报告
旅行商问题 总时间限制: 1000ms 内存限制: 65536kB 描述 某国家有n(1<=n<=10)座城市,给定任意两座城市间距离(不超过1000的非负整数).一个旅行商人希望访问每座 ...
随机推荐
- The 9th Zhejiang Provincial Collegiate Programming Contest->Problem :K-Yet Another Story of Rock-pap
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3610 题意:一对恋人受到fff团惩罚,需要比剪刀石头布,谁输谁死,出一样都 ...
- Akka的fault tolerant
要想容错,该怎么办? 父actor首先要获知子actor的失败状态,然后确定该怎么办, “怎么办”这回事叫做“supervisorStrategy". // Restart the st ...
- [笨木头FireFly01]入门篇1·最简单的服务端和客户端连接
原地址:http://www.9miao.com/question-15-53938.html 最近一直在写游戏,几乎没有来写教程了,打算放慢一下脚步,学学新东西.那为嘛我要学FireFly呢? 之前 ...
- 关于delete和delete[]
[精彩] 求问delete和delete[] 的区别??http://www.chinaunix.net/jh/23/311058.html C++告诉我们在回收用 new 分配的单个对象的内存空间的 ...
- HDU1411+四面体的体积
用cos sin各种乱搞之后 求出一个公式.. 但是怕精度损失厉害,还是暂且贴个公式的,copy别人的.. #include<stdio.h> #include<math.h> ...
- IText 生成横向的doc文档
IText生成doc文档需要三个包:iTextAsian.jar,iText-rtf-2.1.4.jar,iText-2.1.4.jar 亲测无误,代码如下: import com.lowagie.t ...
- PreparedStatement的用法
转载:http://www.cnblogs.com/raymond19840709/archive/2008/05/12/1192948.html jdbc(java database connect ...
- CodeForces250B——Restoring IPv6(字符串处理)
Restoring IPv6 DescriptionAn IPv6-address is a 128-bit number. For convenience, this number is recor ...
- Android TextView结合SpannableString使用
super.onCreate(savedInstanceState); TextView txtInfo = new TextView(this); SpannableString ss = new ...
- 《RabbitMQ in action》
Producers create messages and publish (send) them to a broker server (RabbitMQ).What’s a message? A ...