摘要:
链接:http://poj.org/problem?id=1113求凸包的模板题,只是这个精度卡死人,而且我的g++死活过不了,换成c++就过了,唉,poj上太多这样的题了,实在让人无语啊View Code 1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<math.h> 4 #define N 1005 5 #define pi 3.141592653 6 struct point 7 { 8 int x,y; 9 };10 int n;11 int dis(point p1,point p2)12 { 阅读全文
posted @ 2012-05-04 21:18
zhenhai
阅读(169)
评论(0)
推荐(0)
摘要:
链接:http://poj.org/problem?id=2318这道题是比较简单的计算几何问题,只要找每个点应该在第几块内部就可以了,用叉积判断方向,二分查找View Code 1 #include<stdio.h> 2 #include<string.h> 3 struct point 4 { 5 double x,y; 6 }; 7 struct 8 point a[10005]; 9 int num[5005];10 double mul(point p1,point p2,point p3)//叉积11 {12 return (p2.x-p1.x)*(p3.. 阅读全文
posted @ 2012-05-04 12:24
zhenhai
阅读(211)
评论(0)
推荐(0)

浙公网安备 33010602011771号