hdoj 1254 推箱子 bfs嵌套
摘要:
这题一边听着歌,一边做,结果相当悲剧。WA了无数次。。。。看来BFS写得还是要规范点,这样细节上才能减少出错。#include <iostream>#include <cmath>#include <queue>using namespace std;struct Position { int x, y;};struct Status { Position person, box; int deep;}_s;int mp[10][10], n, m;int dir[4][2] = { 1, 0, 0, -1, -1, 0, 0, 1 };Status per 阅读全文