摘要:
//判断负环 在负环内的城市输出? #include <iostream> #include <queue> #include <cstdio> #include <algorithm> #include <string.h> #include <string> using namespace st 阅读全文
posted @ 2020-01-27 17:30
晴屿
阅读(115)
评论(0)
推荐(0)
摘要:
#include<iostream> #include<algorithm> #include<queue> #include<cstdio> #include<cstring> using namespace std; const int N=1100,INF=0x3f3f3f3f; int h[ 阅读全文
posted @ 2020-01-27 16:52
晴屿
阅读(118)
评论(0)
推荐(0)
摘要:
#include<cstdio> #include<cmath> #include<cstring> #include<cstring> #include<iostream> #include<queue> using namespace std; const int N=205; const do 阅读全文
posted @ 2020-01-27 14:27
晴屿
阅读(155)
评论(0)
推荐(0)
摘要:
//从起点1到剩余P-1个点的最短距离之和+从剩余P-1个点到起点1的最短距离之和 #include<iostream> #include<cstring> #include<cstdio> #include<queue> using namespace std; const int LEN=100 阅读全文
posted @ 2020-01-27 14:05
晴屿
阅读(115)
评论(0)
推荐(0)
摘要:
#include<iostream> #include<cstring> using namespace std; const int N=110,INF=0x3f3f3f3f; int f[N][N]; int main() { int n,m; cin>>n>>m; memset(f,0x3f, 阅读全文
posted @ 2020-01-27 13:27
晴屿
阅读(105)
评论(0)
推荐(0)
摘要:
#include<cstdio> #include<cstdlib> #include<cstring> #include<iostream> using namespace std; const int N=110; const int INF = 0x3f3f3f3f; char s[20]; 阅读全文
posted @ 2020-01-27 13:14
晴屿
阅读(106)
评论(0)
推荐(0)
摘要:
//判断负环 dist初始化为正无穷 //正环 负无穷 #include<iostream> #include<cstring> #include<queue> #include<algorithm> using namespace std; const int N = 510, M = 5210; 阅读全文
posted @ 2020-01-27 12:56
晴屿
阅读(116)
评论(0)
推荐(0)
摘要:
//spfa 判断正环 #include<iostream> #include<queue> #include<cstring> using namespace std; const int N=1e4; const int INF=2e9; int h[N],to[N],ne[N],idx; do 阅读全文
posted @ 2020-01-27 11:53
晴屿
阅读(124)
评论(0)
推荐(0)