摘要:
题目链接 AcWing 3803. 数组去重 #include <iostream> #include <cstring> #include <algorithm> #include <stack> using namespace std; const int N = 60, M = 1010; i 阅读全文
posted @ 2021-08-14 23:44
冯大善人
阅读(33)
评论(0)
推荐(0)
摘要:
基础课图论复习-最短路 朴素Dijkstra算法 (适合稠密图 用邻接矩阵存图) 时间复杂度 O(\(n^2 + m\)) n表示点数, m表示边数 AcWing 849. Dijkstra求最短路I int g[N][N]; // 存储每条边 int dist[N]; // 存储1号点到每个点的最 阅读全文
posted @ 2021-08-14 01:18
冯大善人
阅读(59)
评论(0)
推荐(0)
摘要:
题目链接AcWing 1106. 山峰和山谷 经典Flood Fill 用bfs做 #include <iostream> #include <algorithm> #include <cstring> #define x first #define y second using namespace 阅读全文
posted @ 2021-08-14 01:01
冯大善人
阅读(44)
评论(0)
推荐(0)
摘要:
题目链接 AcWing1098. 城堡问题 #include <iostream> #include <cstring> #include <algorithm> #define x first #define y second using namespace std; typedef pair<i 阅读全文
posted @ 2021-08-14 00:58
冯大善人
阅读(45)
评论(0)
推荐(0)
摘要:
题目链接 AcWing1097. 池塘计数 经典FloodFill 用bfs做 #include <iostream> #include <algorithm> #include <cstring> #define x first #define y second using namespace s 阅读全文
posted @ 2021-08-14 00:56
冯大善人
阅读(47)
评论(0)
推荐(0)
浙公网安备 33010602011771号