文章列表
kruskal找(判断)最短路
摘要:#include<iostream>
#include<algorithm>
#include<cstring>
using namespace std;
const int N=1e5+……
prim求最短路(稀疏)
摘要://prim求最短路(神似dijkstra)
#include<iostream>
#include<algorithm>
#include<cstring>
using namespa……
spfa判断图中是否存在负权
摘要://利用spfa判断该图存不存在负环
#include<iostream>
#include<cstring>
#include<algorithm>
#include<queue>
……
spfa:正权负权边通用最短路
摘要:#include<iostream>
#include<cstring>
#include<algorithm>
#include<queue>
using namespace std;……
堆优化版最短路(dijkstra)
摘要:#include<iostream>
#include<cstring>
#include<algorithm>
#include<vector>
#include<queue>
us……
最短路(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>……