找出最小生成树,同时用Max[i][j]记录i到j的唯一路径上最大边权.然后用不在最小生成树里的边i-j来替换,看看是否差值为0. #include <algorithm> #include <cstdio> #include <cstring> using namespace std; const int N=101; const int INF=0x3f3f3f3f; int n,m,ans,s; int lowc[N],vis[N],g[N][N]; int Ma…
The Unique MST Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 19941 Accepted: 6999 Description Given a connected undirected graph, tell if its minimum spanning tree is unique. Definition 1 (Spanning Tree): Consider a connected, undir…