摘要:
先算重心!!!!!!再算凸包!!!!!!!View Code 1 /* 2 几何+重心 3 */ 4 #include<stdio.h> 5 #include<string.h> 6 #include<stdlib.h> 7 #include<algorithm> 8 #include<iostream> 9 #include<queue> 10 //#include<map> 11 #include<math.h> 12 using namespace std; 13 typedef long l 阅读全文
posted @ 2013-03-19 20:22
xxx0624
阅读(450)
评论(0)
推荐(0)
摘要:
详见代码View Code 1 /* 2 几何+线段相交 3 */ 4 #include<stdio.h> 5 #include<string.h> 6 #include<stdlib.h> 7 #include<algorithm> 8 #include<iostream> 9 #include<queue>10 //#include<map>11 #include<math.h>12 using namespace std;13 typedef long long ll;14 //typedef 阅读全文
posted @ 2013-03-19 18:27
xxx0624
阅读(265)
评论(0)
推荐(0)
摘要:
View Code 1 /* 2 几何+判断凸多边形 3 */ 4 #include<stdio.h> 5 #include<string.h> 6 #include<stdlib.h> 7 #include<algorithm> 8 #include<iostream> 9 #include<queue>10 //#include<map>11 #include<math.h>12 using namespace std;13 typedef long long ll;14 //typedef _ 阅读全文
posted @ 2013-03-19 14:43
xxx0624
阅读(283)
评论(0)
推荐(0)
摘要:
详见代码View Code 1 /* 2 几何+判定点是否在多边形内 3 */ 4 #include<stdio.h> 5 #include<string.h> 6 #include<stdlib.h> 7 #include<math.h> 8 const int maxn = 105; 9 const double eps = 1e-8;10 const int inf = 99999999;11 const int max_x = 1000;12 const int max_y = 1000;13 struct point{14 double 阅读全文
posted @ 2013-03-19 14:11
xxx0624
阅读(358)
评论(0)
推荐(0)
摘要:
这是按照自己理解写的一个测试代码。。。简单易懂#include<stdio.h>#include<string.h>#include<stdlib.h>const int maxn = 10005;int a[ maxn ],c[ maxn ];int lowbit( int i ){ return i&(-i);}int sum( int i ){ int s=0; while( i>0 ){ s+=c[ i ]; i-=lowbit( i ); } return s;}void update( int i,int new_val,int p 阅读全文
posted @ 2013-03-19 10:38
xxx0624
阅读(217)
评论(0)
推荐(0)

浙公网安备 33010602011771号