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 ...
随机推荐
- Datetime 模块求日期差
Datetime 模块求日期差 导入 datetime 模块/实例化当前时间对象 调用.date() 方法 得到当前年/月/日时间 实例化时间差对象 delta 求当前日期减去时间差 delta 后的 ...
- [转载]MySQL concat函数的使用
MySQL concat函数是MySQL数据库中众多的函数之一,下文将对MySQL concat函数的语法和使用进行说明,供您参考和学习. MySQL concat函数使用方法:CONCAT(str1 ...
- Python2 socket 多线程并发 ThreadingTCPServer Demo
# -*- coding:utf-8 -*- from SocketServer import TCPServer, StreamRequestHandler import traceback cla ...
- Javascript 广告浮动效果在浏览器中间N秒后移动到右下角
Javascript 广告浮动效果在浏览器中间N秒后移动到右下角 闲着无聊做了一个,本人原创...就是这个页面的广告效果....怎么样???? 刚刚学习的javascript
- Java - 在控制台中执行一个可执行jar
1.Maven打包一个可执行jar: <build> <plugins> <plugin> <groupId>org.apache.maven.plug ...
- LVS Nginx Haproxy对比
一般对负载均衡的使用是随着网站规模的提升根据不同的阶段来使用不同的技术. 具体的应用需求还得具体分析,如果是中小型的Web应用,比如日PV小于1000万,用Nginx就完全可以了: 如果机器不少,可以 ...
- 合并apk和odex 为完整的apk安装文件
from:http://bbs.hiapk.com/thread-1151284-1-1.html 文件夹:<ignore_js_op> 文件夹拖放到odex.cmd,出现下面的窗口后,按 ...
- Django~1
一 什么是web框架? 框架,即framework,特指为解决一个开放性问题而设计的具有一定约束性的支撑结构,使用框架可以帮你快速开发特定的系统,简单地说,就是你用别人搭建好的舞台来做表演. 对于所有 ...
- TOGAF和BABOK
- Vuex mapGetters,mapActions
一.基本用法 1. 初始化并创建一个项目 ? 1 2 3 vue init webpack-simple vuex-demo cd vuex-demo npm install 2. 安装 vuex ? ...