文章列表

筛选

染色法判二分图

摘要://二分图:图中不含奇数环  一条边两个点的颜色需不同  #include<iostream> #include<cstring> #include<algorithm> using na……

prim求最短路(稀疏)

摘要://prim求最短路(神似dijkstra)  #include<iostream> #include<algorithm> #include<cstring> using namespa……

floyd求最短路

摘要://floyd求最短路  #include<iostream> #include<cstring> #include<algorithm> using namespace std; co……

最短路(dijkstra)

摘要:#include<iostream> #include<algorithm> #include<cstring>  using namespace std; const int N=1e1……

拓扑排序/家谱树(板子)

摘要://按拓扑排序排列 不断删除入度为0的节点  #include<iostream> #include<cstring> #include<algorithm> using namesp……

2023raip_u3_投子游戏(遍历)

摘要://注意: 可能重投之后仍和原来一样  初始化:分母为1,概率为-1,个数为0 #include<iostream> #include<algorithm> #include<cmath>……