hdu 5243 Homework
Homework
Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 413 Accepted Submission(s): 48
In his homework, DRD needs to partition a point set S into two part. You can see that if one part has 100 points and the other has only 1 point, then this partition cannot be beautiful since it's too imbalanced. DRD wants to find a line to separate S, so that no points lie in the line and there are at least ⌊|S|3⌋ points in each side of the line. DRD finds it amazing that there may exist some points (no need to be in S) that if a line l passes it and does not pass any points in S, then l can be a separating line. Now, he wonders the area these points form.
There are T cases following. In each case, the first line contains an positive integer n≤1000, and n lines follow. In each of these lines, there are 2 integers xi,yiindicating a point (xi,yi) in the plane. Note that |xi|,|yi|≤104
You can assume that no three points in S lies in the same line.
Your answer is considered correct if and only if the absolute error or the relative error is smaller than 10−6.
4
1 1
1 -1
-1 -1
-1 1
8
-1 -1
-1 1
1 -1
1 1
-2 -2
-2 2
2 -2
2 2
Case #2: 5.333333
hdu 5243 Homework的更多相关文章
- HDU——1789Doing Homework again(贪心)
Doing Homework again Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Oth ...
- 动态规划: HDU 1789Doing Homework again
Problem Description Ignatius has just come back school from the 30th ACM/ICPC. Now he has a lot of h ...
- HDU 1789 Doing Homework again (贪心)
Doing Homework again http://acm.hdu.edu.cn/showproblem.php?pid=1789 Problem Description Ignatius has ...
- HDU 1074 Doing Homework (dp+状态压缩)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1074 题目大意:学生要完成各科作业, 给出各科老师给出交作业的期限和学生完成该科所需时间, 如果逾期一 ...
- 【状态DP】 HDU 1074 Doing Homework
原题直通车:HDU 1074 Doing Homework 题意:有n门功课需要完成,每一门功课都有时间期限t.完成需要的时间d,如果完成的时间走出时间限制,就会被减 (d-t)个学分.问:按怎样 ...
- HDU 1074 Doing Homework (动态规划,位运算)
HDU 1074 Doing Homework (动态规划,位运算) Description Ignatius has just come back school from the 30th ACM/ ...
- hdu 1789 Doing HomeWork Again (贪心算法)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1789 /*Doing Homework again Time Limit: 1000/1000 MS ...
- HDU 1789 - Doing Homework again - [贪心+优先队列]
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1789 Time Limit: 1000/1000 MS (Java/Others) Memory Li ...
- HDU 5298 Solid Geometry Homework 暴力
Solid Geometry Homework 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5298 Description Yellowstar ...
随机推荐
- 如何安装secureCRT8.1破解
安装地址 网盘: https://pan.baidu.com/s/1iGxi6BTCMC_jewCwcUHhgA 密码: u6jq 安装教程 1.点击安装 2.全部默认即可,安装完成之后再桌面上右击该 ...
- Spring 单例
我们知道 Web 容器本身就是多线程的,Web 容器为一个 Http 请求创建一个独立的线程,所以由此请求所牵涉到的 Spring 容器中的 Bean 也是运行于多线程的环境下.在绝大多数情况下,Sp ...
- 【云图】怎样制作全国KTV查询系统?
摘要:本文以[唱吧]531麦霸音乐节为案例,具体解读了怎样导入自有数据到高德云图,并进行检索和展示.最后,调起高德mobile地图来进行路线规划和周边查询. 本案例能够应用在微信开发平台,支付宝公众服 ...
- github常用的git命令
添加已有项目到github: touch README.md //新建说明文件 git init //在当前项目目录中生成本地git管理,并建立一个隐藏.git目录 git add . //添加当前目 ...
- spring tiles界面为空白
Caused by: org.apache.jasper.JasperException: /WEB-INF/views/admin_template.jsp(3,62) Unable to read ...
- python常用模块-1
一.认识模块 1.什么是模块:一个模块就是一个包含了python定义和声明的文件,文件名就是加上.py的后缀,但其实import加载的模块分为四个通用类别 : 1.使用python编写的代码(.py文 ...
- LDA主题模型三连击-入门/理论/代码
目录 概况 为什么需要 LDA是什么 LDA的应用 gensim应用 数学原理 预备知识 抽取模型 样本生成 代码编写 本文将从三个方面介绍LDA主题模型--整体概况.数学推导.动手实现. 关于LDA ...
- UI控件之UICollectionView
UICollectionView:集合视图,是iOS6.0后出现的,与UITableView类似,优势在于可以灵活的布局cell UICollectionViewLayout:布局类,抽象类,一般定义 ...
- java Excel导入导出工具类
本文章,导入导出依赖提前定义好的模板 package com.shareworx.yjwy.utils; import java.io.File; import java.io.FileInputSt ...
- 基于SSM的单点登陆03
TbUser.java和TbUserExample.java,TbUserMapper.java,TbUserMapper.xml由mybatis框架生成. generatorConfig.xml & ...