摘要:
//不存在负权回路 //边权可能为负数 #include <cstring> #include <iostream> #include <algorithm> using namespace std; const int N = 210, INF = 1e9; int n, m, Q; int d[ 阅读全文
posted @ 2019-11-12 15:05
晴屿
阅读(153)
评论(0)
推荐(0)
摘要:
//存在负权值 处理负环 //如果能求出来 一般是不存在负权回路 //如果有负回路 那最小距离可能是负无穷 #include <cstring> #include <iostream> using namespace std; const int N = 1e4+1; struct Edge { i 阅读全文
posted @ 2019-11-12 15:04
晴屿
阅读(158)
评论(0)
推荐(0)
摘要:
#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] 阅读全文
posted @ 2019-11-12 15:04
晴屿
阅读(218)
评论(0)
推荐(0)
摘要:
#include <cstring> #include <iostream> #include <algorithm> #include <queue> using namespace std; const int N = 2010, M = 10010; int n, m; int h[N], w 阅读全文
posted @ 2019-11-12 15:04
晴屿
阅读(185)
评论(0)
推荐(0)
摘要:
//稀疏图 点和边差不多 #include <cstring> #include <iostream> #include <algorithm> #include <queue> using namespace std; typedef pair<int, int> PII; const int N 阅读全文
posted @ 2019-11-12 15:03
晴屿
阅读(216)
评论(0)
推荐(0)
摘要:
//朴素Dijkstra 边权都是正数 稠密图:点和边差的比较多 #include<cstring> #include<iostream> #include<algorithm> using namespace std; const int N = 510; int n, m; int g[N][N 阅读全文
posted @ 2019-11-12 15:02
晴屿
阅读(235)
评论(0)
推荐(0)