zrq495
www.zrq495.com
摘要: 凸包 + 枚举。代码如下: 1 #include<iostream> 2 #include<cstdio> 3 #include<cstring> 4 #include<cstdlib> 5 #include<cmath> 6 #include<algorithm> 7 8 using namespace std; 9 10 typedef struct node11 {12 int x, y;13 }node;14 15 node f[50002];16 17 bool cmp(node a,node b) //叉积排序 阅读全文
posted @ 2012-08-16 19:15 zrq495 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 围墙的周长= 凸包 周长+圆的周长。代码如下: 1 #include<iostream> 2 #include<cstdio> 3 #include<cstring> 4 #include<cstdlib> 5 #include<cmath> 6 #include<algorithm> 7 8 #define PI 3.141592653 9 10 using namespace std;11 12 typedef struct node13 {14 int x, y;15 }node;16 17 node f[1002] 阅读全文
posted @ 2012-08-16 19:04 zrq495 阅读(186) 评论(0) 推荐(0) 编辑