/*
HDU5979 Convex
http://acm.hdu.edu.cn/showproblem.php?pid=5979
计算几何 三角形面积公式
*
*
*/
#include <cstdio>
#include <algorithm>
#include <cmath>
using namespace std;
const double Pi=acos(-1.0);
int main()
{
int n,b;
//freopen("2.in","r",stdin);
double r;
while(scanf("%d%d",&n,&b)==)
{
r=1.0*b;
r=r*r;
r=r/2.0;
double ans=0.0;
double de;
while(n--)
{
scanf("%d",&b);
de=1.0*b;
ans+=sin(Pi*de/180.0);
//printf("%.3lf\n",ans);
}
ans=ans*r;
printf("%.3lf\n",ans);
}
return ;
}

HDU5979 Convex的更多相关文章

  1. [LeetCode] Convex Polygon 凸多边形

    Given a list of points that form a polygon when joined sequentially, find if this polygon is convex ...

  2. Leetcode: Convex Polygon

    Given a list of points that form a polygon when joined sequentially, find if this polygon is convex ...

  3. low-rank 的相关求解方法 (CODE) Low-Rank Matrix Recovery and Completion via Convex Optimization

    (CODE) Low-Rank Matrix Recovery and Completion via Convex Optimization 这个是来自http://blog.sina.com.cn/ ...

  4. 关于shape_trans (ConnectedRegions, ConvexRegions, 'convex')的作用于对比

    * crystal.hdev: extraction of hexagonally shaped crystals via local thresholding and region post-pro ...

  5. 论文阅读之 A Convex Optimization Framework for Active Learning

    A Convex Optimization Framework for Active Learning Active learning is the problem of progressively ...

  6. 凸包(Convex Hull)构造算法——Graham扫描法

    凸包(Convex Hull) 在图形学中,凸包是一个非常重要的概念.简明的说,在平面中给出N个点,找出一个由其中某些点作为顶点组成的凸多边形,恰好能围住所有的N个点. 这十分像是在一块木板上钉了N个 ...

  7. convex optimization

    ##凸优化总结所有这些想法基本是来自于书籍[convex optimization](http://book.douban.com/subject/1888111/),主要包括凸优化的基本理论,主要的 ...

  8. Convex Hull 实现理论+自制Python代码

    Convex Hull 概述 计算n维欧式空间散点集的凸包,有很多的方法.但是如果要实现快速运算则其难点在于:如何快速判断散点集的成员是否是在凸集的内部.如果可以简化判断的运算过程,则可以极大简化迭代 ...

  9. Convex(扫描线降维)

    Convex Time Limit: 10000/4000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Sub ...

随机推荐

  1. CodeForces 486B

    Let's define logical OR as an operation on two logical values (i. e. values that belong to the set { ...

  2. 2017-3-13 leetcode 4 11 15

    ji那天居然早起了,惊呆我了,眼睛有点儿疼,一直流泪....继续保持 ========================================================== leetco ...

  3. Mysql库的操作

    一.系统数据库 执行如下命令,查看系统库 show databases; information_schema: 虚拟库,不占用磁盘空间,存储的是数据库启动后的一些参数,如用户表信息.列信息.权限信息 ...

  4. JavaScript定时器的开启关闭

    <html> <head> <meta charset="utf-8"> <title>无标题文档</title> &l ...

  5. 运行Tomcat闪退问题,报的错误:Unsupported major.minor version 51.0

    在MyEclipse中运行tomcat,tomcat闪退并且报以下错误. java.lang.UnsupportedClassVersionError: org/apache/catalina/sta ...

  6. Kettle通用数据贴源作业设计

    本设计基于以下需求提出 1. 快速接入数据源表(贴源/落地) 2. 无须给单独表开发转换/作业 3. 动态生成数据源连接, 表字段等信息(预先保存在数据仓库中) 本设计所需条件 1. 数据源为关系型数 ...

  7. 模拟试题B

    模拟试题B 一.单项选择题(2′*8 =16′) 1.灰度等级为256级,分辨率为2048*1024的显示器,至少需要的帧缓存容量为( ) A)512KB B)1MB C)2MB D)3MB 2.在多 ...

  8. 常用 CSS 选择器

    // css 读取顺序从右到左,符合要求的都会匹配 // 通配符选择器 -- 选择所有元素 * // 通配符选择器 -- 选择某个元素下的所有元素 .demo * // 元素选择器 html,body ...

  9. Java中 ArrayList类的使用

    java.util.ArrayList 是大小可变的数组的实现,存储在内的数据称为元素.此类提供一些方法来操作内部存储 的元素. ArrayList 中可不断添加元素,其大小也自动增长. ArrayL ...

  10. javaee 文件的读取

    package Shurushucu; import java.io.FileNotFoundException; import java.io.FileOutputStream; import ja ...