摘要: #include<stdio.h>#include<string.h>#include<stdlib.h>#include<math.h>#include<algorithm>using namespace std;struct point{ double x; double y;}p[20];struct T{ int xx;// int yy;// int zz;// double mianji;//}res;bool cmp(int a,int b){ return a<b;}point operator-(const p 阅读全文
posted @ 2012-07-24 21:59 willzhang 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 极角排序#include<stdio.h>#include<string.h>#include<stdlib.h>#include<math.h>#include<algorithm>using namespace std;struct point{ double x; double y;}a[55];double mu(point a,point b){ return a.x*b.y-b.x*a.y;}bool cmp(const point &a,const point &b){ return mu(a,b)> 阅读全文
posted @ 2012-07-24 20:27 willzhang 阅读(155) 评论(0) 推荐(0) 编辑