随笔分类 - 图论
摘要:题目链接:https://www.luogu.com.cn/problem/P3916 链式前向星详细教程:https://www.bilibili.com/video/BV13r4y1X7a4/?spm_id_from=333.788 1 #include<bits/stdc++.h> 2 con
阅读全文
摘要:题目链接:http://ybt.ssoier.cn:8088/problem_show.php?pid=1970 洛谷地址:https://www.luogu.com.cn/problem/P2670 本题的难点,1、是字符及字符串的出入输出 2、四个方向的遍历 方法一:有BUG #include<
阅读全文
摘要:题目链接https://www.luogu.com.cn/problem/P4017 知识点:拓扑排序+动态规划 一、刚开始审题不清,误认为是求AOV最长生物链上生物的个数,便出现如下代码 1 #include<bits/stdc++.h> 2 using namespace std; 3 cons
阅读全文
摘要:题目链接https://www.luogu.com.cn/problem/P3366 1 #include<bits/stdc++.h> 2 using namespace std; 3 const int maxm=200005; 4 int n, m; 5 struct edg{ 6 int x
阅读全文
摘要:https://www.luogu.com.cn/problem/P5318 存储一:邻接表 1 #include<cstdio> 2 #include<vector> 3 #include<queue> 4 #include<cstring> 5 #include<algorithm> 6 usi
阅读全文
摘要:http://ybt.ssoier.cn:8088/problem_show.php?pid=1381 方法一:邻接矩阵存图写法 方法二:邻接表(vector)存图写法
阅读全文
摘要:https://blog.csdn.net/qq_35710556/article/details/79583229
阅读全文
摘要:Dijkstra算法图文详解:https://blog.csdn.net/lbperfect123/article/details/84281300 动画演示https://www.cnblogs.com/kex1n/p/4178782.html dijkstra算法 通过边实现松弛 : https
阅读全文
摘要:《啊哈!算法》总结:Floyd-傻子也能看懂的弗洛伊德算法(转) 如果你看不懂,你就还不如傻子 Floyd数学推理过程:https://www.cnblogs.com/ECJTUACM-873284962/p/6995648.html 相关练习题目:奇怪的电梯 医院设置
阅读全文