几何
LK自动机
机惨我的人都没马
展开
-
Surround the Trees
Description There are a lot of trees in an area. A peasant wants to buy a rope to surround all these trees. So at first he must know the minimal required length of the rope. However, he does not kn原创 2018-01-11 16:17:19 · 372 阅读 · 0 评论 -
判断线段相交
Description 给出两条线段,判断它们是否相交。 Input 输入x1,y1,x2,y2,x3,y3,x4,y4, (x1,y1)、(x2,y2)是第一条线段的两个端点,(x3,y3)、(x4,y4)是第二条线段的两个端点。 Output 如果相交输出’YES’,否则输出’NO’。 Sample Input 1 2 3 4 1 4 3 2 Sample Output YE原创 2018-01-05 20:03:56 · 598 阅读 · 0 评论 -
【中山市选2013】蓄养
Description 平面上有N颗树,标号从1到N,每颗树有坐标(Xi, Yi)。要求在平面上找几棵树,在一些树之间建篱笆形成一个闭合图形(篱笆不能在除了树以外的地方相交,形成的图形面积不能为0).求最小可能围成的面积。 Input 第一行输入N。 然后N行第i行输入第i棵树的坐标Xi和Yi。 Output 输出最小围成的面积,小数点后保留两位小数。无解输出“Impossible”原创 2018-01-19 12:34:57 · 437 阅读 · 0 评论