博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2011年9月7日

摘要: 题目:http://acm.hdu.edu.cn/showproblem.php?pid=4007给定一些点和一个正方形,求正方形能圈住的最多点数。参考了P103的黑书。View Code #include <stdio.h>#include <algorithm>using namespace std;typedef struct{ int x, y;} point;bool cmp(point a, point b){ if (a.x == b.x) return a.y < b.y; return a.x < b.x;}bool cmp2(point 阅读全文

posted @ 2011-09-07 23:43 紫华弦筝 阅读(144) 评论(0) 推荐(0) 编辑

摘要: 题目:http://poj.org/problem?id=1264一道凸包题,求导弹射中的凸包的面积之和。View Code #include <stdio.h>#include <math.h>#include <string.h>#include <iostream>#include <algorithm>using namespace std;const double eps = 1e-8;const double pi = acos(-1.0);typedef struct{ double x, y;}cpoint;doubl 阅读全文

posted @ 2011-09-07 23:43 紫华弦筝 阅读(164) 评论(0) 推荐(0) 编辑