미로탐색
[실1] 2178 - 미로탐색
특이사항) 좌표 (1,1)부터 (y,x)까지 이동하라는데 (1,1)부터 시작 시 로직이 복잡해지므로 (0,0)부터 시작 #include #include #include #include using namespace std;#define FAST_IO() ios::sync_with_stdio(0); cin.tie(0);#define y first#define x secondusing IntPair = pair;IntPair dir[]{ {1, 0}, // 상 {-1, 0}, // 하 {0, -1}, // 좌 { 0, 1 }, // 우};vector> map, dist;queue q;int y, x, cnt;void Bfs(){ while (!q.empty()) { auto cur = q.front..