启蒙博客:https://blog.csdn.net/AI_BigData_wh/article/details/77943787?locationNum=2&fps=1
POJ2069:最小球覆盖
被精度搞死。。POJ做题经常被精度卡到怀疑人生。。好感-1-1-1...-1
队友的模拟退火的模版好像是错的(但是能过HDU3007,很玄学了)。初识温度的设置不能太大,会影响最终结果的准确度。
ac代码:
#include <iostream>
#include <cmath>
using namespace std;
const int maxn = 40;
const double eps = 1e-7;
const double DINF = 0x7fffffff;
const double initT = 400;//设小了可能会wa,POJ2069开到500会wa,200-400可行
struct Point{
double x, y, z;
Point(double x = 0, double y = 0, double z = 0):x(x),y(y),z(z){}
};
Point p[maxn];
int n;
double dist(Point a, Point b)
{
return sqrt((a.x

最低0.47元/天 解锁文章
2667

被折叠的 条评论
为什么被折叠?



