随笔分类 -  计算几何

摘要:题目连接http://poj.org/problem?id=11131113#include <stdio.h>#include<algorithm>#include <math.h>using namespace std;int q[50050];int f;struct node{ int x,y;}a[50050];int cmp(struct node p1,struct node p2){ int x1 = p1.x-a[0].x; int x2 = p2.x-a[0].x; int y1 = p1.y-a[0].y; int y2 = p2.y- 阅读全文
posted @ 2012-08-21 21:18 某某。 阅读(151) 评论(0) 推荐(0)
摘要:pc代码View Code hdu 1147#include<iostream>#include<cstdio>#include<cstring>#include<cmath>#include<queue>using namespace std;const int N=1002;const double eps=0.0000000001;//注意设置一个精度struct node{ double ux,uy; double lx,ly; int num; bool tab;};queue<node> ss;double j 阅读全文
posted @ 2012-08-15 16:04 某某。 阅读(244) 评论(0) 推荐(0)
摘要:View Code #include <iostream>#include <stdio.h>using namespace std;typedef struct node{ double x; double y;}point;point p[105];point make_e(point x,point y){ point a; a.x = x.x - y.x; a.y = x.y - y.y; return a;}double cha(point x,point y){ return x.x*y.y - y.x*x.y;}int main(){ ... 阅读全文
posted @ 2012-08-15 15:51 某某。 阅读(192) 评论(0) 推荐(0)
摘要:#include <iostream>#include <stdio.h>using namespace std;typedef struct node{ double x; double y;}point;typedef struct ed{ point a; point b; int is_top;}edge;edge e[100005];point make_e(point x,point y){ point a; a.x = x.x - y.x; a.y = x.y - y.y; return a;}double cha(point... 阅读全文
posted @ 2012-08-15 15:47 某某。 阅读(273) 评论(0) 推荐(0)