hdoj 5979 Convex
来源:互联网 发布:百度地图经纬度数据库 编辑:程序博客网 时间:2024/06/07 22:52
题目链接:Convex
题目大意:有一些围绕原点的距离为d的n个点,他们之间有n-1个度数给出来,现在求这个多边形的面积
题目思路:当n-1三角形来算面积,加起来就好,三角形套正弦公式就好了
#include <map>#include <set>#include <cmath>#include <vector>#include <cstdio>#include <cstring>#include <cstdlib>#include <iostream>#include <algorithm>using namespace std;typedef long long ll;const double pi = acos(-1);int main(){ double d,x; int n; while(~scanf("%d%lf",&n,&d)){ double ans = 0.0; for(int i = 0;i < n;i++){ scanf("%lf",&x); ans += sin((x*pi)/180.0); } ans = (ans*d*d)/2.0; printf("%.3lf\n",ans); } return 0;}
阅读全文
0 0
- hdoj 5979 Convex
- hdu 5979 Convex
- hdu 5979 Convex
- hdu-5979-Convex
- convex
- HDU 5979 Convex(数学)
- HDU-5979 Convex(易题)
- HDU 5979 Convex (几何)
- HDOJ 5533 Dancing Stars on Me(凸包,convex hall)
- HDU 5979 Convex (三角形面积公式)
- HDU 5979 && 2016ICPC大连 I: Convex
- hdoj 4195 Regular Convex Polygon(余弦定理+正凸多边形性质)
- hdu 5979 Convex(正弦定理求三角形面积)
- convex hull
- Convex combination
- ACdream1012:Convex
- HDU5979 Convex
- Convex functions
- CodeChef:Chef and Subsequences(思维 & dfs)
- 中石油 4509 keks(贪心)
- struts2_基础
- <C语言经典100例>c10 素数
- 腾讯云直播面试时的问题和解答
- hdoj 5979 Convex
- Java迭代器和增强for
- Refletion2017.9.15
- UML常见类图关系及对应的plantUML语法
- 虚析构函数分析
- 直播排行榜怎么区分的
- 机器人的运动范围
- Gimp 快速入门(4)
- 散列表——理论