
图论
ccshijtgc
这个作者很懒,什么都没留下…
展开
-
Roadblocks(dij)
Roadblocks#include <cstdio>#include <cstring>#include <queue>#include <algorithm>#define MAXN (5000 + 10)#define INF (5000*5000*2)using namespace std;struct edge {...原创 2018-10-19 08:47:39 · 249 阅读 · 1 评论 -
HDU2066:一个人的旅行(Dijkstra)
一个人的旅行#include <stdio.h>#include <string.h>#include <algorithm>using namespace std;const int inf = 1<<30; int T,S,D,n;int map[1111][1111];int vis[1111],cast[1111];i...原创 2018-10-20 10:27:46 · 180 阅读 · 0 评论 -
HDU 3790 最短路径问题 dij
最短路径问题#include <stdio.h>#include <string.h>#include <algorithm>using namespace std;const int inf = 1<<30;int n, m;int map_len[1005][1005], map_time[1005][1005];int vi...原创 2018-10-22 09:48:59 · 206 阅读 · 0 评论 -
HDU 2112 today(dij)
HDU Today#include <stdio.h>#include <iostream>#include <cstring>#include <algorithm>#include <map>using namespace std;#define inf 0x3f3f3f3fint cast[205], vis[...原创 2018-10-22 09:50:45 · 219 阅读 · 0 评论 -
HDU 1548 A strange lift(Dijkstra)
A strange lift#include <stdio.h>#include <string.h>#include <algorithm>using namespace std;const int inf = 1<<30;int n;int map[205][205];int a[205], cnt;int vis[20...原创 2018-10-22 10:02:07 · 164 阅读 · 0 评论 -
HDU 1227 Arbitrage(spfa)
Arbitrage#include <stdio.h>#include <iostream>#include <cstring>#include <map>#include <queue>#include <algorithm>using namespace std;const int L = 35;c...原创 2018-10-22 13:58:14 · 141 阅读 · 0 评论 -
HDU 2807 The Shortest Path(floyd)
The Shortest Path#include <stdio.h>#include <string.h>#include <algorithm>using namespace std;#define inf 99999999int n,m;int map[85][85];int a[85][85][85], tem[85][85];...原创 2018-10-22 15:47:07 · 174 阅读 · 0 评论 -
HDU 2680 Choose the best route(dij)
Choose the best route#include <stdio.h>#include <string.h>#include <algorithm>using namespace std;const int inf = 100000000;int n,m,s;int map[1005][1005];int vis[1005],cast...原创 2018-10-22 15:50:55 · 158 阅读 · 0 评论 -
HDU 1245 Saving James Bond(floyd)
Saving James Bond#include <cstdio>#include <cstring>#include <cmath>#include <algorithm>using namespace std;const double inf = 100000000;double map[105][105];int s[1...原创 2018-10-25 11:11:35 · 260 阅读 · 0 评论 -
HDU 1599 find the mincost route(floyd)
find the mincost route#include <stdio.h>#include <string.h>#include <algorithm>using namespace std;const int inf = 100000000;int n, m, ans;int map[105][105];int dis[105][10...原创 2018-10-23 11:42:42 · 175 阅读 · 0 评论 -
HDU 2544 最短路(dij)
最短路#include <bits/stdc++.h>#include <set>using namespace std;const int MAX_N = 10000;const int MAX_M = 100000;const int inf = 0x3f3f3f3f;struct edge { int v, w, next;} e[MA...原创 2018-10-20 10:27:55 · 167 阅读 · 0 评论 -
HDU 1874 畅通工程续(spfa)
畅通工程续#include <iostream>#include <cstdio>#include <cstring>#include <queue>#include <climits>using namespace std;const int MAXN = 200+5;const int MAXM = 1000+5...原创 2018-10-20 10:28:06 · 162 阅读 · 0 评论 -
骑车比赛(dij)
骑车比赛#include <bits/stdc++.h>#include <set>using namespace std;const int MAX_N = 10000;const int MAX_M = 100000;const int inf = 0x3f3f3f3f;struct edge { int v, w, next;} e[M...原创 2018-10-19 08:52:03 · 230 阅读 · 0 评论 -
圣诞树(dij)
圣诞树#include <bits/stdc++.h>#include <set>using namespace std;const int MAX_N = 50005;const int MAX_M = 500005;const int inf = 0x3f3f3f3f;struct edge { int v, w, next;} e[MA...原创 2018-10-19 08:53:03 · 1376 阅读 · 0 评论 -
迷阵突围(dij)
迷阵突围#include<iostream>#include<cstdio>#include<vector>#include<cmath>#include<string.h>#include<map>using namespace std;const int MAXN=205;double inf=999...原创 2018-10-19 08:54:22 · 614 阅读 · 0 评论 -
闯关游戏(spfa)
闯关游戏#include <iostream>#include <cstdio>#include <cstring>#include <queue>#include <climits>using namespace std;const int MAXN = 110;const int MAXM = 11000;int...原创 2018-10-19 08:55:40 · 226 阅读 · 0 评论 -
成仙之路(spfa)
成仙之路#include <iostream>#include <cstdio>#include <cstring>#include <queue>#include <climits>int L[200010];using namespace std;int MAXN=70000;int p[70000];boo...原创 2018-10-19 08:56:43 · 220 阅读 · 0 评论 -
蒜头君的银行卡(差分)
蒜头君的银行卡#include<iostream>#include<cstdio>#include<cctype>#include<cstring>#include<algorithm>#include<cmath>//#include<set>//#include<vector&原创 2018-10-19 08:57:57 · 320 阅读 · 0 评论 -
蒜厂年会(floyd)
蒜厂年会#include <bits/stdc++.h>using namespace std;const int MAXN = 305;const int INF = 0x3f3f3f3f;int group1[MAXN];int group2[MAXN];int G[MAXN][MAXN];int n, m;void floyd(){ for(...原创 2018-10-19 08:58:58 · 520 阅读 · 0 评论 -
蒜头君的训练室(floyd)
蒜头君的训练室#include <bits/stdc++.h>using namespace std;const int MAXN = 305;const int INF = 0x3f3f3f3f;int group1[MAXN];int group2[MAXN];int G[MAXN][MAXN];int n, m, t;void floyd(){ ...原创 2018-10-19 09:00:02 · 442 阅读 · 0 评论 -
美好的邂逅(floyd)
美好的邂逅#include <bits/stdc++.h>using namespace std;const int MAXN = 305;const int INF = 0x3f3f3f3f;int group1[MAXN];int group2[MAXN];int G[MAXN][MAXN];int n, m, t;void floyd(){ ...原创 2018-10-19 09:00:51 · 275 阅读 · 0 评论 -
HDU1596:find the safest road(Dijkstra)
find the safest road#include <stdio.h>#include <string.h>#include <math.h>#include <algorithm>using namespace std;const double inf = 1000000;int n, m;double map[1005...原创 2018-10-23 14:25:41 · 190 阅读 · 0 评论