POJ 2079】的更多相关文章

链接:http://poj.org/problem?id=2079 Triangle Time Limit: 3000MS   Memory Limit: 30000K Total Submissions: 8173   Accepted: 2423 Description Given n distinct points on a plane, your task is to find the triangle that have the maximum area, whose vertices…
题链: http://poj.org/problem?id=2079 题解: 计算几何,凸包,旋转卡壳 复杂度O(N^2),(O(N)什么的就不说了,我觉得我看过的O(N)方法正确性都有问题,虽然有些AC了,那应该是鲁棒性太强了,谁叫他们非要每挪动一步都取MAX的呢) 做法: (三角形的三个顶点在凸包的顶点上,同时显然三角形的底边不一定为凸包的边啦!) 枚举i,j两点,使得有向线段$\vec{ij}$作为三角形底边. 然后在有向线段$\vec{ij}$的右侧区域(凸包上),寻找k点使得三角形ij…
[题目链接] http://poj.org/problem?id=2079 [题目大意] 给出一些点,求出能组成的最大面积的三角形 [题解] 最大三角形一定位于凸包上,因此我们先求凸包,再在凸包上计算, 因为三角形在枚举了一条固定边之后,图形面积随着另一个点的位置变换先变大后变小 因此我们发现面积递减之后就移动固定边. [代码] #include <cstdio> #include <algorithm> #include <cmath> #include <ve…
呃,不知道我用的算不算卡壳,总有点枚举的意思. 先求凸包,然后,枚举其中一点,再枚举另一点作为结尾,这个向量旋转一周后,求出最大值面积.这里面用的是旋转卡壳判断的那个式子. PS:下一篇和这题是一样题意,但用这题的写法去过下一题,是过不了的.但这个写法在POJ 上是400MS,而下一题的写法在POJ上是1000MS..汗了.. #include <iostream> #include <cstdio> #include <algorithm> #include <…
Triangle Time Limit: 3000MS   Memory Limit: 30000K Total Submissions: 8917   Accepted: 2650 Description Given n distinct points on a plane, your task is to find the triangle that have the maximum area, whose vertices are from the given points. Input…
Triangle Time Limit: 3000MS   Memory Limit: 30000K Total Submissions: 9525   Accepted: 2845 Description Given n distinct points on a plane, your task is to find the triangle that have the maximum area, whose vertices are from the given points. Input…
Triangle Time Limit: 3000MS   Memory Limit: 30000K Total Submissions: 9060   Accepted: 2698 Description Given n distinct points on a plane, your task is to find the triangle that have the maximum area, whose vertices are from the given points. Input…
Triangle Time Limit: 3000MS   Memory Limit: 30000K Total Submissions: 7625   Accepted: 2234 Description Given n distinct points on a plane, your task is to find the triangle that have the maximum area, whose vertices are from the given points. Input…
Given n distinct points on a plane, your task is to find the triangle that have the maximum area, whose vertices are from the given points. Input The input consists of several test cases. The first line of each test case contains an integer n, indica…
Triangle Description Given n distinct points on a plane, your task is to find the triangle that have the maximum area, whose vertices are from the given points. Input The input consists of several test cases. The first line of each test case contains…