摘要:
Cow Contest floyd求传递闭包 SCUACM2022集训前训练-图论 - Virtual Judge (vjudge.net) 若 a 大于 b,则连一条 a - > b 的边,一个点能走到的点就是比它小的点 跑一遍 floyd,就可知道任意两个点的大小关系 枚举 i, j,如果 i 阅读全文
posted @ 2022-05-25 21:47
hzy0227
阅读(34)
评论(0)
推荐(0)
摘要:
Wormholes spfa 判负环 SCUACM2022集训前训练-图论 - Virtual Judge (vjudge.net) #include <iostream> #include <cstring> #include <algorithm> #include <vector> #incl 阅读全文
posted @ 2022-05-25 21:44
hzy0227
阅读(36)
评论(0)
推荐(0)
摘要:
LCA 倍增 #include <iostream> #include <cstring> #include <algorithm> #include <vector> #include <queue> using namespace std; typedef long long ll; const 阅读全文
posted @ 2022-05-25 20:10
hzy0227
阅读(193)
评论(0)
推荐(0)
摘要:
灾后重建 P1119 灾后重建 - 洛谷 | 计算机科学教育新生态 (luogu.com.cn) floyd 本题考查 floyd 算法的本质: for (int k = 1; k <= n; k++) for (int i = 1; i <= n; i++) for (int j = 1; j < 阅读全文
posted @ 2022-05-25 13:20
hzy0227
阅读(84)
评论(0)
推荐(0)
摘要:
P3870 [TJOI2009] 开关 TJOI2009] 开关 - 洛谷 | 计算机科学教育新生态 (luogu.com.cn) 线段树 维护区间和,区间异或 区间异或可视为 区间和 = 区间长度 - 区间和 #include <iostream> #include <cstring> #incl 阅读全文
posted @ 2022-05-25 11:39
hzy0227
阅读(47)
评论(0)
推荐(0)

浙公网安备 33010602011771号