摘要:
//BFS+优先队列(打印路径)#include<cstdio>#include<cstdlib>#include<cstring>#include<queue>using namespace std;const int ROW = 101;const int COL = 101;const int DIRS = 4;struct priNode { int x, y, time; friend bool operator < (priNode a, priNode b) { return a.time > b.time; }};st 阅读全文
摘要:
//bfs+优先队列#include<cstdio>#include<cstring>#include<queue>using namespace std;const int ROW = 201;const int COL = 201;const int DIRS = 4;char map[ROW][COL];int dir[DIRS][2] = {-1,0,0,1,1,0,0,-1};struct priNode { int x, y, time; friend bool operator < (priNode a, priNode b) { ret 阅读全文