摘要:
最短路,bellmanView Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>#include <cmath>using namespace std;#define inf 0x3f3f3f3f#define maxn 100#define maxm 10000#define eps 10e-9int n, m, pre[maxn], edge[maxm][2];double d[maxm];double dist[maxn]; 阅读全文
posted @ 2011-07-24 12:19
undefined2024
阅读(197)
评论(0)
推荐(0)
摘要:
bfsView Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>using namespace std;#define maxn 8struct Wall{ int s, e; int p; bool h;}wall[5];struct Point{ int x, y;}s, e, q[maxn * maxn];int n = 6;int step[maxn][maxn];int from[maxn][maxn];int dir[4][2] 阅读全文
posted @ 2011-07-24 10:23
undefined2024
阅读(209)
评论(0)
推荐(0)