minux_sufe
minux_sufe
全部文章
分类
算法(2)
题解(28)
归档
标签
去牛客网
登录
/
注册
Code Rush
0x00
全部文章
(共7篇)
tarjan scc缩点解法
#include<bits/stdc++.h> using namespace std; typedef long long LL; const int N=100005; const int M=600005; // 会建两边图 int n, m, E=0; int h[N], ...
scc
图论
tarjan
缩点
2020-07-02
0
485
tarjan缩点找出拓扑图中的最长链
#include <bits/stdc++.h> using namespace std; typedef long long LL; const int N=100005; const int M=2000005; const LL P=1000007; // hash code ...
scc
图论
tarjan
缩点
2020-07-02
0
488
tarjan缩点
#include <bits/stdc++.h> using namespace std; const int N=105; const int M=10005; int n; int head[N], E=0; // 邻接表建图 int dfn[N], low[N], ts=0; ...
scc
图论
tarjan
缩点
2020-07-01
0
414
tarjan缩点
#include <bits/stdc++.h> using namespace std; const int N=10005; const int M=50005; int n, m, E=0, scc_cnt=0; int head[N], id[N], sz[N], dout[N...
scc
图论
tarjan
缩点
2020-07-01
0
493
在线建图SPFA
#include <bits/stdc++.h> using namespace std; const int N=30; const int M=80; // 统计出差分系统方程组的个数不超过80个 const int K=1005; int a[N], r[N], dist[N],...
图论
前缀和
2020-06-29
0
531
SPFA求解
#include <bits/stdc++.h> using namespace std; const int N=1005; const int M=10005+10005+1005; const int INF=0x3f3f3f3f; int n, m1, m2, E=0; in...
图论
2020-06-29
0
580
kruskal求解
问题需要转化一下思路,转化为找一个权值, 当去掉权值的边后, 剩余的连通块的数量要. #include <bits/stdc++.h> using namespace std; const int N=505; // NC上本题数据范围缺失, 从LOJ上查询到1<=n<=5...
图论
2020-06-24
0
455