上一页 1 ··· 65 66 67 68 69 70 71 72 73 ··· 182 下一页
摘要: 最短路View Code #include <iostream>#include <cstdlib>#include <cstring>#include <cstdio>using namespace std;#define maxf 105#define maxn 505#define inf 0x3f3f3f3fint firenum, n;int fire[maxf];int map[maxn][maxn];int firedist[maxn];void input(){ scanf("%d%d", &firen 阅读全文
posted @ 2011-10-03 13:58 undefined2024 阅读(257) 评论(0) 推荐(0)
摘要: 打表View Code #include <iostream>#include <cstdlib>#include <cstring>#include <cstdio>using namespace std;#define maxn 35005int n;int pre[maxn], next[maxn];void del(int a){ pre[next[a]] = pre[a]; next[pre[a]] = next[a];}void init(){ n = 35000; for (int i = 0; i < n; i++) { p 阅读全文
posted @ 2011-10-03 13:24 undefined2024 阅读(196) 评论(0) 推荐(0)
摘要: 最短路View Code #include <iostream>#include <cstdlib>#include <cstring>#include <cstdio>#include <cmath>using namespace std;#define maxn 205struct Point{ double x, y;}point[maxn];double map[maxn][maxn];double subv, walkv;int n;double dist(Point &a, Point &b){ Point 阅读全文
posted @ 2011-10-02 21:12 undefined2024 阅读(292) 评论(0) 推荐(0)
摘要: 简单题View Code #include <iostream>#include <cstdlib>#include <cstring>#include <cstdio>using namespace std;#define maxn 400#define maxl 100char st[maxn][maxl];int n, m;int from[maxn];int to[maxn];int getid(char *a){ for (int i = 0; i < m; i++) if (strcmp(st[i], a) == 0) retu 阅读全文
posted @ 2011-10-02 15:00 undefined2024 阅读(164) 评论(0) 推荐(0)
摘要: 最短路View Code #include <iostream>#include <cstdlib>#include <cstring>#include <cstdio>using namespace std;#define maxm 50005#define maxn 1005struct Edge{ int v, next;}edge[maxm * 2];int n, m;int head[maxn];int ecount;int from[maxn];int q[maxn];int stk[maxn];bool vis[maxn];void 阅读全文
posted @ 2011-10-02 14:06 undefined2024 阅读(211) 评论(0) 推荐(0)
上一页 1 ··· 65 66 67 68 69 70 71 72 73 ··· 182 下一页