题目意思是给你一个完全图,每个点有一个权值。
求一棵生成树。你可以使其中一条边权值变成0.使得该边两点的权值和除以生成树的边劝和最小。
思路:
#include <iostream>
#include <stdio.h>
#include <string.h>
#include <math.h>
using namespace std;
const int maxn=1111,inf=99999999;
double d[maxn][maxn],dist;
int n;
double ans;
struct
{
}a[maxn];
double f(int t,int s)
{
}
int text[maxn],fa[maxn];
double key[maxn];
int min()
{
}
int head[maxn],lon;
struct
{
}e[111111];
int edgemake(int from,int to,double w)
{
}
int prim()
{
}
int dfs(int t,int s,int sum)
{
}
int main()
{
}