POJ 1127 Jack Straws (线段不规范相交&&图的连通性&&Floyd-Warshall算法)
http://poj.org/problem?id=1127/*16ms,376KB*/
#include
#include
structP
{
intx,y;
P(intx=0,inty=0):x(x),y(y){}
Poperator+(Pp)
{
returnP(x+p.x,y+p.y);
}
Poperator-(Pp)
{
returnP(x-p.x,y-p.y);
}
intdot