[hdu] P7058 Ink on paper 求最小生成树的最大边
题目链接
求最小生成树的最大边。
图是完全图,在稠密图中prim算法更优
#include<bits/stdc++.h>
#define FAST ios::sync_with_stdio(false),cin.tie(0),cout.tie(0)
typedef long long ll;
const int maxn = 1e5+5;
const ll INF = 1LL<<60;
using namespace std;
int n,m,tot;
ll dis[5005],m
原创
2021-09-05 21:05:17 ·
257 阅读 ·
0 评论