Description During a voyage of the starship Hakodate-maru (see Problem 1406), researchers found strange synchronized movements of stars. Having heard these observations, Dr. Extreme proposed a theory of "super stars". Do not take this term as a…
题目:http://poj.org/problem?id=2069 不是随机走,而是每次向最远的点逼近.而且也不是向该点逼近随意值,而是按那个比例:这样就总是接受,但答案还是要取min更新. 不知那个比例是怎么算.不过如果直接随机走或者向那个方向随机走的话,就过不了. #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<ctime>…
题目:http://poj.org/problem?id=2069 仍是随机地模拟退火,然而却WA了: 看看网上的题解,都是另一种做法——向距离最远的点靠近: 于是也改成那样,竟然真的A了...感觉这个做法的随机因素好像很小?不过似乎也是一种套路. 代码如下: #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<cmath> #inc…
模拟退火. #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #include<cmath> #define maxn 30 #define eps 1e-7 using namespace std; struct point { double x,y,z; }p[maxn],s; int n; double delta=0.98; double d…
题目大意: 给定三位空间上的n(\(n \leq 30\))个点,求最小的球覆盖掉所有的点. 题解: 貌似我们可以用类似于二维平面中的随机增量法瞎搞一下 但是我不会怎么搞 所以我们模拟退火就好了啊QAQ #include <cmath> #include <cstdio> #include <cstring> #include <algorithm> using namespace std; typedef long long ll; inline void…
题解 求一个最小的半径的球,包括三维平面上所有的点,输出半径 随机移动球心,半径即为距离最远的点,移动的方式是向离的最远的那个点移动一点,之后模拟退火就好 代码 #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <cmath> //#define ivorysi #define MAXN 105 #define eps 1e…
Super Star http://poj.org/problem?id=2069 Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 6486   Accepted: 1603   Special Judge Description During a voyage of the starship Hakodate-maru (see Problem 1406), researchers found strange synch…
Super Star Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 6422   Accepted: 1591   Special Judge Description During a voyage of the starship Hakodate-maru (see Problem 1406), researchers found strange synchronized movements of stars. Hav…
题目传送门 /* 题意:求费马点 三分:对x轴和y轴求极值,使到每个点的距离和最小 */ #include <cstdio> #include <algorithm> #include <cstring> #include <cmath> ; const int INF = 0x3f3f3f3f; double x[MAXN], y[MAXN]; int n; double sum(double x1, double y1) { ; ; i<=n; +…
A Star not a Tree? Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 3435   Accepted: 1724 Description Luke wants to upgrade his home computer network from 10mbs to 100mbs. His existing network uses 10base2 (coaxial) cables that allow you…