#include <iostream>
#include<cstdio>
#include<algorithm>
using
namespace
std;
typedef
double
PointType;
struct
point
{
PointType x,y;
};
point jd;
int
Jiaodian(point a,point b,point c,point d)
//平行返回0 重合返回1 相交返回2
{
double
A1=b.y-a.y,A2=d.y-c.y,B1=a.x-b.x,B2=c.x-d.x;
double
C1=b.y*(b.x-a.x)-b.x*(b.y-a.y),C2=d.y*(d.x-c.x)-d.x*(d.y-c.y);
if
(A1*B2==B1*A2)
//平行或重合
{
if
(A2*C1==A1*C2&&B1*C2==B2*C1)
return
1;
return
0;
}
jd.x=(B1*C2-B2*C1)/(B2*A1-B1*A2);
jd.y=(A1*C2-A2*C1)/(A2*B1-A1*B2);
return
2;
}