链接:http://acm.hdu.edu.cn/showproblem.php?pid=4946
题意:有n个人,在位置(xi,yi),速度是vi,如果对于某个点一个人比所有其他的都能先到那个点,那这个点就被这个人承包了。输出有多少人承包的(鱼塘)面积是无穷大。
思路:找出速度最大值,只有速度是这个最大值的人才有可能承包无穷大的面积(因为高速者早晚会追上低速者)。每两个人相比,他们能承包的位...
分类:
其他好文 时间:
2014-08-14 20:49:39
阅读次数:
199
Problem Description
Teacher Mai has a kingdom with the infinite area.
He has n students guarding the kingdom.
The i-th student stands at the position (xi,yi), and his walking speed is vi.
...
分类:
其他好文 时间:
2014-08-14 20:48:09
阅读次数:
192
题意是在二维平面上
给定n个人
每个人的坐标和移动速度v
若对于某个点,只有 x 能最先到达(即没有人能比x先到这个点或者同时到这个点)
则这个点称作被x占有
若有人能占有无穷大的面积 则输出1 ,否则输出0
思路:
1、把所有点按速度排个序,然后把不是最大速度的点去掉
剩下的点才有可能是占有无穷大的面积
2、给速度最大的点做个凸包,则只有在凸包上的点才有可能占有无穷大...
分类:
其他好文 时间:
2014-08-14 20:46:10
阅读次数:
255
注意:
1.重合的点
2.速度为0的点
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
#include
#include
#include
typedef long long LL;
#define lson l...
分类:
其他好文 时间:
2014-08-14 20:35:49
阅读次数:
226
Sample error:SQL> startupORACLE instance started.Total System Global Area 285212672 bytesFixed Size 1321368 bytesVariable Size 153605736 bytesDatabase...
分类:
移动开发 时间:
2014-08-14 20:01:09
阅读次数:
359
DescriptionBackgroundOur knight lives on a chessboard that has a smaller area than a regular 8 * 8 board,but it is still rectangular.Can you help this...
分类:
其他好文 时间:
2014-08-14 03:46:57
阅读次数:
305
C++:重载函数2(计算面积)时间限制(普通/Java):1000MS/3000MS 运行内存限制:65536KByte总提交:370 测试通过:241描述定义重载函数area(),分别计算正方形、长方形和三角形的面积。输入共计有3行。第1行有一个实数,为正方...
分类:
其他好文 时间:
2014-08-14 00:49:07
阅读次数:
240
求三角形的面积
利用向量点乘得到三角形的面积
三个for循环嵌套即可
#include
#include
#include
#include
using namespace std;
const double INF = 1e9+50;
double x[1000];
double y[1000];
double area(int i, int j, int k)
{
do...
分类:
其他好文 时间:
2014-08-13 14:56:26
阅读次数:
198
Description
YH gave Qz an odd matrix consists of one or zero. He asked Qz to find a square that has the largest area. The problem is not so easy, that means the square you find must not contai...
分类:
其他好文 时间:
2014-08-12 19:11:04
阅读次数:
208
题意:给你n个二维平面上的矩形,可以两两覆盖,问最后覆盖的总面积为多少解题思路:1)矩形状分割,可以知道,每多出一个矩形就和前面所有产生的矩形判断,看是有相交,如果有的话,就对前面的矩形进行分割,最多可以分割成8块,因为这个算法是n×n的算法时间复杂度,所以我们还需要在枚举的时候加速,采用引导值(下...
分类:
其他好文 时间:
2014-08-12 10:06:43
阅读次数:
255