摘要:
include include include include using namespace std; const int maxn = 505000; int n, m, dis[maxn], vis[maxn], ans; struct edge{ int from, to, next, le 阅读全文
posted @ 2018-09-07 21:08
Misaka_Azusa
阅读(114)
评论(0)
推荐(0)
摘要:
题目链接:https://www.luogu.org/problemnew/show/P3623 说是对克鲁斯卡尔的透彻性理解 正解: 先考虑加入水泥路,然后再考虑加入剩下必须要加入的最少鹅卵石路。 之后对原图再跑最小生成树 先跑鹅卵石路到k条。 再从所有水泥路中直到成为最小生成树。 include 阅读全文
posted @ 2018-09-07 20:13
Misaka_Azusa
阅读(132)
评论(0)
推荐(0)

浙公网安备 33010602011771号