미로탐색

알고리즘 문제 풀이/1DP_과제(~180615)

171102_2178_미로탐색

#include #include using namespace std; struct cord { int x; int y; }; bool map[102][102]; int visited[102][102]; void input_map(int N, int M) { char c; for (int i = 1; i c; if (c == '1') map[i][j] = 1; else map[i][j] = 0; } } int solv_maze(int n, int m, cord s) { //int cnt = 0; queue q; q.push(s); cord next; cord now = q.front(); visited[now.y][now.x] = 1; while (!q.empty()) { now = q.front(); q..

bong sue
'미로탐색' 태그의 글 목록