[uva] 10209 - Is This Integration ?
来源:互联网 发布:提卡网页源码 编辑:程序博客网 时间:2024/06/13 07:36
[uva] 10209 - Is This Integration ?
【题目】http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1150
【题意】求各个阴影部分的面积
【算法】简单几何
【题解】一次标记为s3,s2,s1.那么要求的就是s3,4s2,4s1.其弧AC交弧BD于E,过E点作AD的垂线交AD于F。那么不难求出梯形ABEF的面积为(3/8*sqrt(3)-pi/6)*a*a。其扇形ABE面积为sqrt(3)/2.0*a*a,所以S扇AEF=S梯形减去扇形ABE面积。然后就不难算出类椭圆ABE了,其等于s1+2s2+s3。对角线上的两个四分之一圆相交减去正方形面积就是2s2+s3。那么求得s1。正方形面积减去四分之一圆是2s1+s2,求得s2。最后求出s3。
【注意】推公式时要耐心和细心,写错一个符号都卡好久。
【代码】
#include<iostream>#include<cstring>#include<cstdio>#include<cmath>using namespace std;int main(){ double a,pi=4.0*atan(1.0); while(scanf("%lf",&a)!=EOF)printf("%.3f %.3f %.3f\n",(1-sqrt(3.0)+pi/3.0)*a*a,(2*sqrt(3.0)+pi/3.0-4)*a*a,(4.0-sqrt(3.0)-2*pi/3.0)*a*a); return 0;}
- uva 10209 Is This Integration?
- [uva] 10209 - Is This Integration ?
- UVA 10209 - Is This Integration
- UVA 10209 Is This Integration ?
- UVa 10209 - Is This Integration ?
- UVa Problem 10209 Is This Integration? (需要积分吗?)
- UVA 10209(Is This Integration ?-容斥原理)
- uva 10209 Is This Integration ? (计算几何)
- UVa 10209 Is This Integration ?(计算几何)
- UVA 343 What Base Is This?
- UVa 11479 - Is this the easiest problem?
- UVa 343 - What Base Is This?
- uva 343 What Base Is This?
- maven Integration is disabled
- Materialized View Integration Is Over
- Continuous Integration is your best friend
- Integration
- This is a test
- 判断栈的增长方向
- jbpm5.3 mysql 错误 Could not initialize StatefulKnowledgeSession
- android init launch
- C语言运算符和结合性
- 代码复用
- [uva] 10209 - Is This Integration ?
- .net详细学习路线及传智播客教学视频下载
- Peekmessage和Getmessage
- 代码复用
- 饭工和碗工
- 重视代码复用
- panel控件
- Tomcat7列出Web应用下的所有页面
- 一.宏定义(3) --查看宏展开