随笔分类 - 计算几何
摘要:题目连接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-
阅读全文
摘要: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
阅读全文
摘要: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(){ ...
阅读全文
摘要:#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...
阅读全文

浙公网安备 33010602011771号