X-man

导航

2013年8月4日 #

poj 1654 Area

摘要: #include#include#define Max 1000100char s[Max];struct Point{ int x,y;} p[Max];long long myfabs(long long x){ if(x#include#include#define Max 1000100#define eps 1e-12char s[Max];struct Point{ int x,y;} p[Max];long long myfabs(long long x){ if(x<0)x=-x; return x;}int xmult(Point p1,Poin... 阅读全文

posted @ 2013-08-04 17:32 雨钝风轻 阅读(270) 评论(0) 推荐(0) 编辑

poj 3348 Cows

摘要: #include#includeusing namespace std;#define Max 10100struct Point{ int x,y;}p[Max];int dis(Point p1,Point p2){ return (p1.x-p2.x)*(p1.x-p2.x)+(p1.y-p2.y)*(p1.y-p2.y);}int xmult(Point p1,Point p2,Point p0){ return (p1.x-p0.x)*(p2.y-p0.y)-(p2.x-p0.x)*(p1.y-p0.y);}bool cmp(Point p1,Point p2){ ... 阅读全文

posted @ 2013-08-04 15:51 雨钝风轻 阅读(136) 评论(0) 推荐(0) 编辑

poj 1228 Grandpa's Estate

摘要: #include#includeusing namespace std;#define Max 1000struct Point{ int x,y;}p[Max],res[Max];int xmult(Point p1,Point p2,Point p0){ return (p1.x-p0.x)*(p2.y-p0.y)-(p2.x-p0.x)*(p1.y-p0.y);}bool cmp(Point p1,Point p2){ if(p1.y=0;i--) { while(len!=top&&xmult(res[top],p[i],res[top-1])=3... 阅读全文

posted @ 2013-08-04 11:58 雨钝风轻 阅读(176) 评论(0) 推荐(0) 编辑