摘要:
点击查看代码 #include<iostream> #include<cstring> using namespace std; const int N = 510, M = 1e5 + 10; int n, m, k; int dist[N], last[N]; struct Edge { int 阅读全文
posted @ 2022-05-06 22:24
wKingYu
阅读(32)
评论(0)
推荐(0)
摘要:
复杂度 \(O(m*log(n))\) 点击查看代码 #include<iostream> #include<cstring> #include<queue> using namespace std; typedef pair<int, int> PII; const int N = 1e6 + 1 阅读全文
posted @ 2022-05-06 10:58
wKingYu
阅读(25)
评论(0)
推荐(0)
摘要:
复杂度 \(O(n^{2})\) 点击查看代码 #include<iostream> #include<cstring> using namespace std; const int N = 510; int n, m; int g[N][N], dist[N]; bool st[N]; int d 阅读全文
posted @ 2022-05-06 09:40
wKingYu
阅读(25)
评论(0)
推荐(0)
摘要:
点击查看代码 #include<iostream> #include<cstring> #include<queue> using namespace std; const int N = 1e5 + 10; int n, m; int h[N], e[N], ne[N], idx; int d[N 阅读全文
posted @ 2022-05-06 08:55
wKingYu
阅读(34)
评论(0)
推荐(0)