X-man

导航

2013年7月24日 #

HDU 4609 3-idiots(FFT)

摘要: HDU 4609 3-idiots(FFT)3-idiotsTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 216Accepted Submission(s): 73Problem DescriptionKing OMeGa catched three men who had been streaking in the street. Looking as idiots though, the three men insisted that 阅读全文

posted @ 2013-07-24 21:02 雨钝风轻 阅读(140) 评论(0) 推荐(0) 编辑

poj 1410 Intersection

摘要: **必须注意几点1、文中给出的左上顶点和右下顶点不保证x1y2;即需要自己判断2、文中似乎没说,但必须这么认为:线段完全在矩形内部要返回T.3.判断两个线段相交时,注意它们在一条直线上的情况#includestruct Point{ int x,y;}pointc,point1,point2,point[5];struct Line{ Point a,b;}linex;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);}int dmult(... 阅读全文

posted @ 2013-07-24 20:06 雨钝风轻 阅读(157) 评论(0) 推荐(0) 编辑

hdu 4068 I-number

摘要: #include#includechar a[100100];int al;int mysum() //求各位和{ int i,sum=0; al=strlen(a); for(i=0; ix if(sum+a[al-1]>'9') { a[al-1]='0'; jiwei=1; for(i=al-2; i>=0; i--)//增大数a { a[i]+=jiwei; if(a[i]>'9') ... 阅读全文

posted @ 2013-07-24 16:57 雨钝风轻 阅读(192) 评论(0) 推荐(0) 编辑

poj 1066 Treasure Hunt (未完)

摘要: #include#include#include#define eps 1e-8#define zero(x) (((x)>0 ? (x):(-x))dis(point[0],*d)) return 1; return -1;}int main(){ int i,j,n,ans,tmp; scanf("%d",&n); for(i=0;i<n;i++) { scanf("%lf%lf%lf%lf",&line[i].a.x,&line[i].a.y,&line[i].b.x,&line[i].b.y); 阅读全文

posted @ 2013-07-24 15:30 雨钝风轻 阅读(237) 评论(0) 推荐(0) 编辑

poj 2653 Pick-up sticks

摘要: #include#include#include#define eps 1e-8#define zero(x)(((x)>0 ? (x):(-x))<eps)struct Point{ double x,y;};struct Line{ Point a,b;}line[100100],tmp;int num[100100];double xmult(Point p1,Point p2,Point p0)//p0p1*p0p2 叉积{ return (p1.x-p0.x)*(p2.y-p0.y)-(p2.x-p0.x)*(p1.y-p0.y);}double dmult(Poi... 阅读全文

posted @ 2013-07-24 10:50 雨钝风轻 阅读(228) 评论(0) 推荐(0) 编辑