摘要:
每次都取出权值最小的边 并且保证他不会出现环(用并查集维护) 最小边用堆维护 #include<bits/stdc++.h> #include<iostream> using namespace std; typedef long long ll; typedef pair<ll,ll> P; co 阅读全文
摘要:
SPFA/BELLMAN-FORD算法 复杂度最大(VE) #include<bits/stdc++.h> const long long inf=2147483647; const int maxn=10005; const int maxm=500005; using namespace std 阅读全文