DescriptionGiven a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1*1 or greater located...
分类:
其他好文 时间:
2014-08-14 23:39:56
阅读次数:
234
链接: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
Problem
Given a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1 x 1 or greater located within the whole array. The sum of a rectangle...
分类:
其他好文 时间:
2014-08-14 01:35:57
阅读次数:
228
C++:类与对象5(矩形的面积与周长)时间限制(普通/Java):1000MS/3000MS 运行内存限制:65536KByte总提交:349 测试通过:235描述 定义并测试一个类名为rectangle的矩形类,数据成员为矩形的长和宽,定义2个成员函数分...
分类:
其他好文 时间:
2014-08-14 00:49:27
阅读次数:
251
C++:重载函数2(计算面积)时间限制(普通/Java):1000MS/3000MS 运行内存限制:65536KByte总提交:370 测试通过:241描述定义重载函数area(),分别计算正方形、长方形和三角形的面积。输入共计有3行。第1行有一个实数,为正方...
分类:
其他好文 时间:
2014-08-14 00:49:07
阅读次数:
240