上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 26 下一页
摘要: 点击查看代码 #include<iostream> #include<cstring> using namespace std; const int N = 1e5 + 10, M = 2 * N; int n, m; int h[N], e[M], ne[M], idx; int color[N] 阅读全文
posted @ 2022-05-07 21:37 wKingYu 阅读(29) 评论(0) 推荐(0)
摘要: 复杂度 \(O(m*log(m))\) 点击查看代码 #include<iostream> #include<algorithm> using namespace std; const int N = 1e5 + 10, M = 2 * N, INF = 0x3f3f3f3f; int n, m; 阅读全文
posted @ 2022-05-07 15:23 wKingYu 阅读(43) 评论(0) 推荐(0)
摘要: 点击查看代码 #include<iostream> #include<cstring> using namespace std; const int N = 510, INF = 0x3f3f3f3f; int n, m; int g[N][N]; int dist[N]; bool st[N]; 阅读全文
posted @ 2022-05-07 14:35 wKingYu 阅读(50) 评论(0) 推荐(0)
摘要: 复杂度 \(O(n^{3})\) 点击查看代码 #include<iostream> using namespace std; const int N = 210, INF = 1e9; int n, m, k; int d[N][N]; void floyd() { for (int k = 1; 阅读全文
posted @ 2022-05-07 13:13 wKingYu 阅读(45) 评论(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], w[N], idx; i 阅读全文
posted @ 2022-05-07 11:07 wKingYu 阅读(34) 评论(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], w[N], idx; i 阅读全文
posted @ 2022-05-07 10:28 wKingYu 阅读(51) 评论(0) 推荐(0)
摘要: 点击查看代码 #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 阅读(43) 评论(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 阅读(34) 评论(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 阅读(32) 评论(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 阅读(54) 评论(0) 推荐(0)
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 26 下一页