Skycity
来源:互联网 发布:手机远程监控软件 编辑:程序博客网 时间:2024/06/09 17:34
The world's new tallest building is going to be built in Changsha, which will be called as "Skycity". The Skycity is going to be built as a circular truncated cone, radius of its bottom is marked as R, and radius of its top is marked as r, height of the building is marked as H, and there will be F floors with exact the same height in the whole building.
After construction of the building's skeleton, the construction team is going to construct the curtain wall using thousands of glass panes. The curtain wall is installed in each floor. When installing the curtain wall in a floor, first the construction team will measure the radius r' of the ceiling, then they will install the glass curtain wall as a regular prism which can exactly contain the ceiling circle. When constructing the glass curtain wall, all the glass pane has a minimum area requirment S, and amount of glass usage should be as little as possible.
As all the glass has exact the same thickness, so we can calculate the consumption of each glass pane as its area. Could you calculate the minimum total glass consumption?
Input
There will be multiple test cases. In each test case, there will be 5 integers R, r (10 ≤ r < R ≤ 10000), H (100 ≤ H ≤ 10000), F (10 ≤ F ≤ 1000) and S (1 ≤ S < √3 × r × H ÷ F) in one line.
Output
For each test case, please output the minimum total glass consumption, an absolute error not more than 1e-3 is acceptable.
Sample Input
50 10 800 120 5300 50 2000 500 10
Sample Output
149968.3082196020.459题意:给一个圆锥塔,每层用玻璃棱柱包裹圆柱,求总的玻璃面积
#include<iostream>#include<cstdio>#include<cmath>using namespace std;const double Pi=acos(-1.0);int main(){double R,r,H,S,F;while(scanf("%lf%lf%lf%lf%lf",&R,&r,&H,&F,&S)!=EOF){double h=H/F,d=(R-r)/F,ans=0;for(int i=0;i<F;i++){double rr=r+i*d;int n=Pi/atan(S/2/h/rr);ans+=2*rr*tan(Pi/n)*n*h;}printf("%.3lf\n",ans);}return 0;}
思路:根据玻璃面的最小面积,求出每层最小的正多边形
- Skycity
- ZOJ3733 Skycity
- zoj 3733 Skycity
- zoj 3733 skycity
- ZOJ 3733 Skycity 数学
- HDU 4798 Skycity
- HDU 4798 Skycity【几何】
- zoj 3733 Skycity 长沙赛区
- hdu 4798 Skycity(几何)
- UVALive 6618 Skycity(数学)
- HDU 4798 Skycity(计算几何)
- ZJU 3733 长沙现场赛 H Skycity
- HDU 4798 Skycity【计算机几何】【阅读题】
- zoj 3733 Skycity 长沙现场赛H题
- HDU 4793 Collision + HDU 4798 Skycity 简单几何
- zoj 3733 (hdu 4798) Skycity (2013 亚洲区域赛 长沙站 H)
- HDU 4798 Skycity (计算几何+推公式) 2013 Asia Changsha Regional Contest
- CSS格式化文字排版
- 开发完iOS应用,接下去你该做的事
- 面试如何回答
- Swift语言和其他计算机语言的比较
- 什么是 DevSecOps?系列(一)
- Skycity
- 内存地址空间布局
- matplotlib examples 散点图
- MongoEngine 查询数据库
- 增强现实贺卡项目展示
- 微信颤抖了,马云的又一个反人类的社交梦来了
- 在html中调用QQ,MSN,旺旺,Skype,Email的方法
- 一代狙神是Johnny.R
- 排序算法-选择排序