摘要:
贪心 + 连通性 + 最短路 点击查看代码 #include<bits/stdc++.h> using namespace std; typedef long long LL; const int N = 100 + 10; const int INF = 0x3f3f3f3f; const int 阅读全文
posted @ 2022-08-09 23:56
wKingYu
阅读(40)
评论(0)
推荐(0)
摘要:
建图 + 有限制的最短路 点击查看代码 #include<bits/stdc++.h> using namespace std; typedef long long LL; typedef pair<int,int> PII; const int N = 1e6 + 10; const int M 阅读全文
posted @ 2022-08-09 19:35
wKingYu
阅读(32)
评论(0)
推荐(0)
摘要:
按照换乘次数建图,求单源最短路 点击查看代码 #include<bits/stdc++.h> using namespace std; typedef long long LL; typedef pair<int,int> PII; const int N = 1e6 + 10; const int 阅读全文
posted @ 2022-08-09 17:50
wKingYu
阅读(44)
评论(0)
推荐(0)
摘要:
乘积最大的路径 堆优化 dijkstra 复杂度 $O(m \cdot log(n)) = 1 \times 10^5 \times log(2000) \approx 1.1 \times 10^6$ 点击查看代码 #include<bits/stdc++.h> using namespace s 阅读全文
posted @ 2022-08-09 11:52
wKingYu
阅读(32)
评论(0)
推荐(0)
摘要:
选一个起点,到其他点的最短距离之和最小 堆优化 dijkstra ($2500 \ ms$) 复杂度 $O(m \cdot log(n) \cdot p) = 1450 \times log(500) \times 800 \approx 1.04 \times 10^7$ 点击查看代码 #incl 阅读全文
posted @ 2022-08-09 00:15
wKingYu
阅读(38)
评论(0)
推荐(0)

浙公网安备 33010602011771号