随笔分类 -  spfa

摘要:基础的差分约束 #拓展 #Code #include<bits/stdc++.h> using namespace std; const int maxn=5e3+5; int n,m,a,b,c,head[maxn],dis[maxn],ecnt=-1,cnt[maxn]; bool jud=1; 阅读全文
posted @ 2021-09-04 15:41 Mint-hexagram 阅读(47) 评论(0) 推荐(0)
摘要:和原板子区别不大,更符合我的代码习惯 #include<cstdio> #include<algorithm> #include<cstring> #include<queue> using namespace std; const int maxn = 2e5+5; int n, m, head[ 阅读全文
posted @ 2021-07-21 08:10 Mint-hexagram 阅读(48) 评论(0) 推荐(0)