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

2012年7月12日

摘要: 题目:http://poj.org/problem?id=2600复数旋转+模拟退火。一开始还被复数吓到了(没学过啊),查了一下,跟坐标旋转很像啊。。。View Code #include <cstdio>#include <cmath>#include <algorithm>#define dis(a,b) sqrt((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y))using namespace std;const double pi = acos(-1.0);const double eps = 1e-8;struct n 阅读全文

posted @ 2012-07-12 19:40 紫华弦筝 阅读(168) 评论(0) 推荐(0) 编辑

摘要: 题目:http://poj.org/problem?id=3580View Code #include <iostream>#include <cstdio>#include <cstring>using namespace std;const int M = 300000+10;const int inf = 0x3f3f3f3f;#define type intstruct node{ int size, rev; type key, minv, delta; node *ch[2], *pre; void add(type v) { if (s... 阅读全文

posted @ 2012-07-12 18:48 紫华弦筝 阅读(143) 评论(0) 推荐(0) 编辑

摘要: 题目:http://poj.org/problem?id=3285题意:求一个与三个圆的角直径都相等并且最大的点的位置。即为求一个点,使这个点到三个圆的距离与该圆的距离之比相等。用方差的方法来进行评估随机化的结果。然后注意要确保点在范围内。View Code #include <cstdio>#include <cstdlib>#include <cmath>#include <ctime>#include <algorithm>#define dis(a,b) sqrt((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*( 阅读全文

posted @ 2012-07-12 17:35 紫华弦筝 阅读(235) 评论(0) 推荐(0) 编辑

摘要: 题目:http://poj.org/problem?id=3301View Code #include <cstdio>#include <cmath>#include <cstring>#include <algorithm>using namespace std;const double M = 1e99;const double pi = acos(-1.0);const double eps = 1e-8;struct node{ double x, y; void get(){ scanf("%lf%lf", &am 阅读全文

posted @ 2012-07-12 13:55 紫华弦筝 阅读(154) 评论(0) 推荐(0) 编辑