摘要:
题意简单:去掉最小生成树的某一条边并补上一条,求MaxVal思路:贪心(借鉴Yamidie的思路。。。)分别求出最小生成树和次最小生成树,再在这两棵树上求最小生成树 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 const int maxn = 1015; 8 const int maxm = maxn*maxn; 9 const int inf1 = 0x3f3f3f3f; 10 const double inf2 = 9999999999; 11 12 st... 阅读全文