摘要: BFS注意字典序的问题。WA了好多发。#include#include#include#include#includeusing namespace std;const int maxn = 70;int n, cost[maxn][maxn],bb[maxn], ji[maxn];struct a... 阅读全文
posted @ 2015-04-28 23:04 Fighting_Heart 阅读(188) 评论(0) 推荐(0) 编辑
摘要: BFS.....#include#include#include#include#includeusing namespace std;const int maxn = 1111;vectorabc[maxn];int ji[maxn], tt[maxn][maxn], yy[maxn];struc... 阅读全文
posted @ 2015-04-28 21:15 Fighting_Heart 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 写了一下午的dijkstra。突然发现我写的根本不是dijkstra。。。。是没优化过的BFS....... 阅读全文
posted @ 2015-04-28 19:38 Fighting_Heart 阅读(168) 评论(0) 推荐(0) 编辑
摘要: SPFA#include#include#include#include#includeusing namespace std;const int maxn = 222;int k[maxn], ji[maxn];vector abc[maxn];struct aaa{int node, tot;}... 阅读全文
posted @ 2015-04-28 18:59 Fighting_Heart 阅读(119) 评论(0) 推荐(0) 编辑
摘要: SPFA#include#include#include#include#includeusing namespace std;const int maxn = 1111;int tt[maxn][maxn], ji[maxn], yy[maxn];vectorabc[maxn];struct qw... 阅读全文
posted @ 2015-04-28 16:21 Fighting_Heart 阅读(141) 评论(0) 推荐(0) 编辑
摘要: SPFA#include#include#include#include#includeusing namespace std;const int maxn = 2222;vectorabc[maxn];int s[maxn][maxn];int js[maxn];struct aaa{ in... 阅读全文
posted @ 2015-04-28 15:26 Fighting_Heart 阅读(120) 评论(0) 推荐(0) 编辑
摘要: SPFA#include#include#include#include#includeusing namespace std;const int maxn = 2222;vectorabc[maxn];int s[maxn][maxn];int js[maxn];struct aaa{ in... 阅读全文
posted @ 2015-04-28 14:48 Fighting_Heart 阅读(125) 评论(0) 推荐(0) 编辑