摘要: //用结构体进行广搜,便于记录方向变化次数#include#includeusing namespace std;const int maxn = 1000 + 10;const int INF = 0x3fffffff;int dir[4][2] = {0, 1, 0, -1, 1, 0, -1, 0};int map[maxn][maxn];int n, m;int v[maxn][maxn];typedef struct{ int x; int y; int d; //方向 int c; //次数}node;node Start, End;void init(){ f... 阅读全文
posted @ 2014-01-14 21:48 静坐观雨 阅读(173) 评论(0) 推荐(0)