摘要:
//稠密图 #include <cstring> #include <iostream> #include <algorithm> using namespace std; const int N = 100010, M = 200010, INF = 0x3f3f3f3f; int n, m; i 阅读全文
摘要:
//不存在负权回路 //边权可能为负数 #include <cstring> #include <iostream> #include <algorithm> using namespace std; const int N = 210, INF = 1e9; int n, m, Q; int d[ 阅读全文
摘要:
#include <cstring> #include <iostream> #include <algorithm> #include <queue> using namespace std; const int N = 100010; int n, m; int h[N], w[N], e[N] 阅读全文
摘要:
#include <cstring> #include <iostream> #include <algorithm> #include <queue> using namespace std; const int N = 2010, M = 10010; int n, m; int h[N], w 阅读全文
摘要:
//朴素Dijkstra 边权都是正数 稠密图:点和边差的比较多 #include<cstring> #include<iostream> #include<algorithm> using namespace std; const int N = 510; int n, m; int g[N][N 阅读全文
摘要:
模拟队列 #include <cstring> #include <iostream> #include <algorithm> using namespace std; const int N = 100010; int n, m; int h[N], e[N], ne[N], idx;//邻接表 阅读全文
摘要:
队列 #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> #include <queue> using namespace std; const int N = 100010; int n, m; 阅读全文
摘要:
#include <cstdio> #include <cstring> #include <iostream> #include <algorithm> using namespace std; const int N = 100010, M = N * 2; int n; int h[N], e 阅读全文