Tour UVA - 1347

#include
using namespace std;
typedef long long ll;

const double INF=1e18;
const int maxn=1010;
double dp[maxn][maxn],dis[maxn][maxn];

struct node{
	double x,y;
}pot[maxn];

double get_dis(int i,int j){
	return sqrt((pot[i].x-pot[j].x)*(pot[i].x-pot[j].x)+(pot[i].y-pot[j].y)*(pot[i].y-pot[j].y));
}
/*
[i][j]可以到达[i+1][j]或者 [i+1][i] 
*/
void get_dp(int n){
	dp[1][1]=0.0;
	for(int i=2;i<=n;i++){
		for(int j=1;j

你可能感兴趣的:(.....DAG)