摘要: 一、题目描述 二、解题思路 Floyd模板题 三、代码实现 1 #include "bits/stdc++.h" 2 long long dp[1100][1100]; 3 const int inf = 1e9; 4 using namespace std; 5 int main() 6 { 7 阅读全文
posted @ 2022-02-13 19:39 scannerkk 阅读(44) 评论(0) 推荐(0)
摘要: 一、题目描述 二、解题思路 Dijkstra模板题 三、代码实现 1 #include "bits/stdc++.h" 2 using namespace std; 3 const int inf = 1e9 + 10; 4 int graph[2510][2510]; 5 int n,m,s,t; 阅读全文
posted @ 2022-02-13 19:37 scannerkk 阅读(27) 评论(0) 推荐(0)
摘要: 一、题目描述 二、解题思路 floyd模板题 三、代码实现 1 #include "bits/stdc++.h" 2 using namespace std; 3 const int inf = INT_MAX; 4 long long dp[110][110]; 5 int rd[11000]; 阅读全文
posted @ 2022-02-13 19:35 scannerkk 阅读(43) 评论(0) 推荐(0)
摘要: 一、题目描述 二、解题思路 Dijkstra的优化版,时间复杂度用优先队列优化,空间复杂度用链式前向星优化。(标准版直接交就行了) 三、代码实现 1 #include "bits/stdc++.h" 2 #define PII pair<long long,long long> 3 using na 阅读全文
posted @ 2022-02-13 19:33 scannerkk 阅读(43) 评论(0) 推荐(0)
摘要: 一、题目描述 二、解题思路 tarjan求割边模板题,用个答案数组存答案,求出来后排序就可以了。 三、代码实现 1 #include "bits/stdc++.h" 2 using namespace std; 3 int G[200][200]; 4 int low[200],dfn[200],t 阅读全文
posted @ 2022-02-13 19:30 scannerkk 阅读(44) 评论(0) 推荐(0)
摘要: 一、题目描述 二、解题思路 Dijkstra模板题,套模板即可。 三、代码实现 1 #include "bits/stdc++.h" 2 using namespace std; 3 const int inf = 1e9; 4 int dis[210],vis[210]; 5 int graph[ 阅读全文
posted @ 2022-02-13 19:28 scannerkk 阅读(21) 评论(0) 推荐(0)