计算几何
文章平均质量分 83
Crux_D
这个作者很懒,什么都没留下…
展开
-
ZOJ 1704 Myacm Triangles
求三角形内是否包含某点。就枚举四个点,懒得写凸包了。 #include cstdio>#include string>#include cmath>#include algorithm>using namespace std;#define _0 1e-10int N, A, B, C;typedef struct...{ double x, y; char ch;} Po原创 2008-03-18 14:27:00 · 632 阅读 · 0 评论 -
ZOJ 1721 The Doors
一道很好的DP题。预处理每个点对之间是否能直接到达,然后状态很容易划分。#include stdio.h>#include string.h>#include math.h>#define _0 1e-10int N, b[20][4][20][4], ll;double f[20][4];typedef struct...{ double x, y[4];} Wall;Wall w原创 2008-03-18 23:55:00 · 702 阅读 · 1 评论 -
ZOJ 2074 Trip
先求凸包再枚举包上的点对距离。#include cstdio>#include string>#include cmath>#include algorithm>using namespace std;#define eps 1e-10typedef struct...{ double x, y; int id;} Point;Point p[30001];int N;int原创 2008-04-27 11:25:00 · 814 阅读 · 0 评论