#include <iostream>
using namespace std;
struct Point
{
int x, y; };
Point a[];
int main()
{
int n;
while (cin >> n && n != )
{
for (int i = ; i <= n; i++)
{
cin >> a[i].x >> a[i].y;
} double area = 0.0;
for (int i = ; i < n; i++)
{
int x1 = a[i].x;
int y1 = a[i].y;
int x2 = a[i + ].x;
int y2 = a[i + ].y;
area += 0.5*abs(x1*y2 - y1*x2);
}
int x1 = a[].x;
int y1 = a[].y;
int x2 = a[n].x;
int y2 = a[n].y;
area += 0.5*abs(x1*y2 - y1*x2);
printf("%.1lf\n", area);
}
}

hdoj:2036的更多相关文章

  1. 算法——A*——HDOJ:1813

    Escape from Tetris Time Limit: 12000/4000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Othe ...

  2. hdoj:题目分类

    基础题: 1000.1001.1004.1005.1008.1012.1013.1014.1017.1019.1021.1028.1029.1032.1037.1040.1048.1056.1058. ...

  3. HDOJ:1533-Going Home(最小费用流)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1533 解题心得: 第一次写最小费用流的题,去hdoj上找了一个入门级题目,建图比较简单,用了spfa和 ...

  4. hdu:2036.改革春风吹满地

    Problem Description “ 改革春风吹满地,不会AC没关系;实在不行回老家,还有一亩三分地.谢谢!(乐队奏乐)” 话说部分学生心态极好,每天就知道游戏,这次考试如此简单的题目,也是云里 ...

  5. hdoj:2086

    A1 = ? Time Limit: 5000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Subm ...

  6. hdoj:2085

    核反应堆 Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submis ...

  7. hdoj:2084

    数塔 Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submissi ...

  8. HDOJ:6333-Problem B. Harvest of Apples(组合数学+莫队算法+逆元)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6333 解题心得: 这个题可以说是十分精彩了,首先推组合数学的公式,其中一个很重要的公式是Cnm = C ...

  9. HDOJ:6356-Glad You Came(线段树剪枝)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6356 解题心得: 现在深深的知道了算法复杂度的重要了,这个题算复杂度的时候还要把一些常数也算出来,不然 ...

随机推荐

  1. ubuntu安装mysql 时未提示输入密码

    我在Ubuntu16.04版本中使用终端安装MySQL5.7时,按照度娘的教程,搜索如何安装,大多是如下代码: sudo apt-get install mysql-server sudo apt-g ...

  2. stdlib库中qsort函数的使用

    qsort :功 能: 使用快速排序例程进行排序  用 法: void qsort(void *base, int nelem, int width, int (*fcmp)(const void * ...

  3. pho文件操作

    php文件操作函数 readfile - 适用于打开一个文件并读取文件的内容 echo readfile('e:/webdictionary.txt'); fopen('文件名','打开模式') - ...

  4. Eclipse 安装Maven以及Eclipse配置Maven

    安装Maven 1 下载 Downloading Apache Maven 3.5.0 选择 2 解压 3 配置环境变量 新建变量名:MAVEN_HOME  变量值:D:\SoftwareInstal ...

  5. HBase官方文档 之 Region的相关知识

    HBase是以Region为最小的存储和负载单元(这里可不是HDFS的存储单元),因此Region的负载管理,关系到了数据读写的性能.先抛开Region如何切分不说,看看Region是如何分配到各个R ...

  6. Reactor 3 学习笔记(1)

    Reactor 3 与之前学习的RxJava是同一类(反应式编程)框架,基本概念大致差不多,简单记录一下: Reactor 3 利用了java 8中的CompletableFuture.Stream. ...

  7. spring cloud:config-server中@RefreshScope的"陷阱"

    spring cloud的config-serfver主要用于提供分布式的配置管理,其中有一个重要的注解:@RefreshScope,如果代码中需要动态刷新配置,在需要的类上加上该注解就行.但某些复杂 ...

  8. Tracking Boost Regulator TYPICAL 5V REGULATION WITH BOOST CONVERTER AND LDO

    Cs5171: Tracking Boost Regulator Adding a current mirror circuit to a typical boost circuit allows t ...

  9. mysql5.7报err 1055错误 sql_mode=only_full_group_by

    vim /etc/my.cnf 末尾增加 sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_B ...

  10. [Docker] Benefits of Multi-stage Builds

    The benfits of multi-stage builds: Avoid manual creation of intermediate images Reduce complexity Se ...