SSL 1715_计算面积_计算几何

发布于 2019-05-17  904 次阅读


题目描述

呆子是一个很聪明的人但也是一个很粗心的人,因此常常会丢三落四。一次老师给呆子留了一个很简单的题目,已知平面上一平行四边形的四个顶点,求这个平行四边形的面积。但粗心的呆子却只记了三个点的坐标,因此呆子现在和郁闷。你现在能帮助呆子计算一下老师留给呆子的平行四边形可能的最大面积是多少吗


思路

叉积随便搞一下就可以了


#include 
#include 
#include 
#include 
using namespace std;
inline int read(){
    int x=0,p=1;char ch=getchar();
    while (ch<'0'||ch>'9'){if (ch=='-')p=-1;ch=getchar();}
    while (ch>='0'&&ch<='9'){x=(x<<1)+(x<<3)+ch-'0';ch=getchar();}
    return x*p;
}
struct arr
{
    int x,y;
    void intput(){x=read();y=read();}
}edge[4];
arr r;
int find(arr a,arr b,arr c)
{
    return (b.x-c.x)*(a.y-c.y)-(a.x-c.x)*(b.y-c.y);
}
int main()
{
    int n;
    scanf("%d",&n);
    while ()
}
]]>